WO2009121267A1 - A method and an apparatus for realizing nat - Google Patents

A method and an apparatus for realizing nat Download PDF

Info

Publication number
WO2009121267A1
WO2009121267A1 PCT/CN2009/070890 CN2009070890W WO2009121267A1 WO 2009121267 A1 WO2009121267 A1 WO 2009121267A1 CN 2009070890 W CN2009070890 W CN 2009070890W WO 2009121267 A1 WO2009121267 A1 WO 2009121267A1
Authority
WO
WIPO (PCT)
Prior art keywords
nat
media gateway
address
address mapping
indication information
Prior art date
Application number
PCT/CN2009/070890
Other languages
French (fr)
Chinese (zh)
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 WO2009121267A1 publication Critical patent/WO2009121267A1/en

Links

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
    • 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
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/10Architectures or entities
    • H04L65/102Gateways
    • H04L65/1043Gateway controllers, e.g. media gateway control protocol [MGCP] controllers

Definitions

  • the present invention relates to the field of mobile communications, and in particular, to a method and apparatus for implementing NAT. Background technique
  • the next-generation network is a product of a time-multiplexed public switched telephone network and a packet network based on the Internet Protocol/Asynchronous Transfer Mode, which enables integrated services for voice, video and data on the same network.
  • Next generation networks mainly include Media Gateway (MG) and Media Gateway Controller (MGC).
  • MGC Media Gateway
  • MGC Media Gateway Controller
  • MGC Media Gateway Controller
  • MCC Media Gateway Controller
  • the media gateway can be used as a border gateway in different IP networks to implement media stream delivery in different IP networks.
  • the back-to-back mode is usually used.
  • the IP terminals are respectively created in the two IP networks, and the media stream channels are established on the two IP networks.
  • the two IP terminals are placed in the same context inside the media gateway, thereby establishing a complete media stream delivery channel, so that the media stream can pass through the two IP networks.
  • the source address and the destination address need to be modified when the media stream passes through the media gateway.
  • Another way is that the media gateway implements the routing function.
  • the source address and the destination address are not modified, and the routing table in the media gateway is used to find the outbound interface and the address of the next hop through the destination address.
  • the latter method cannot solve the problem that at least one of the two IP networks is a private network. Therefore, the prior art media gateway cannot forward and forward IP packets sent by the public network to the private network. Summary of the invention
  • the method and device of the network address translation enable the media gateway to forward and forward IP packets between the public network and the private network.
  • an embodiment of the present invention provides a method for implementing NAT, where the method includes:
  • the media gateway establishes a NAT address mapping between the private network address and the public network address when receiving the indication information to be established by the media gateway controller to establish a NAT address mapping or receiving the media stream sent from the private network to the public network.
  • an embodiment of the present invention provides a media gateway, including:
  • a receiving unit configured to receive, by the media gateway controller, a NAT address mapping indication information to be established or a media stream that is sent from the private network to the public network;
  • the creating unit is configured to send, according to the NAT address mapping indication information, or the foregoing from the private network to the corresponding, the embodiment of the present invention further provides a media gateway controller, where the media gateway controller includes:
  • a sending unit configured to send, to the media gateway, indication information that needs to establish a NAT address mapping.
  • the media gateway when the media gateway receives the NAT address mapping indication information sent by the media gateway controller or receives the media stream sent from the private network to the public network, establishing a NAT address between the private network address and the public network address.
  • the mapping is implemented to implement NAT on the media gateway, so that the media gateway can forward and forward IP packets sent by the public network to the private network.
  • FIG. 1 is a schematic structural diagram of a first embodiment of a system for implementing NAT according to the present invention
  • FIG. 2 is a schematic flow chart of a first embodiment of a method for implementing NAT according to the present invention
  • FIG. 3 is a schematic structural diagram of a second embodiment of a system for implementing NAT according to the present invention.
  • FIG. 4 is a schematic flow chart of a second embodiment of a method for implementing NAT according to the present invention. detailed description
  • NAT is a standard technique for mapping an address domain, such as a private intranet (Address) address domain, to another address domain, such as an Internet (Internet) address domain.
  • Address an address domain
  • Internet Internet
  • NAT is a standard for the Internet.
  • the NAT device is located at the boundary of the private network and the public network. When the IP data packet sent by the private network arrives at the NAT device, the NAT device is responsible for converting the internal private network IP address into the legal IP address of the public network, that is, mapping the internal private network IP address to the legal IP of the public network.
  • NAT address mapping record a network address translation address mapping table (AT address mapping table) on the NAT device summarizes the NAT address mapping record on the NAT; each NAT address mapping record is also Is a network address translation address mapping entry (NAT address mapping entry) in the AT address mapping table; when an externally sent data packet arrives at the NAT device, the NAT device consults the information in the NAT address mapping table saved by the NAT, The public network address is translated into a private network address and forwarded to the internal receiving point. If it is a basic NAT, the NAT address mapping table stores the mapping relationship between the internal network and the IP address of the external network. If it is a Network Address Port Translation (NAPT), the NAT address mapping table is used. The IP address of the internal network plus the mapping between the IP address of the internal network and the port is saved. Basic NAT and NAPT are collectively referred to as Traditional NAT.
  • NAPT Network Address Port Translation
  • NAT is divided into 4 types, namely Full Cone, Restricted Cone, Port Restricted Cone, and Symmetric.
  • the first three types, collectively called Cone NAT, have one thing in common: NAT translates it into the same external IP address and port as long as it is a packet from the same internal IP address and port.
  • Symmetric is a bit different, as follows: Only when it is sent from the same internal IP address and port and sent to the same external destination IP address and port, NAT translates the internal IP address and port into the same external IP address and port. . From the same internal address and port, but to another external destination IP destination address and port, the NAT will use a different mapping, the internal IP address and port will be converted to a different external IP address and port.
  • the system for implementing NAT in this embodiment includes a media gateway controller 1 and a media gateway 2;
  • the media gateway 2 is configured to implement the NAT function.
  • the media gateway 2 is configured to establish a private network when receiving the indication information that needs to be established by the media gateway controller 1 to establish a NAT address mapping.
  • the media gateway controller 1 includes an obtaining unit 10 (optional), a first sending unit 11, a storage unit 12 (optional), and a first receiving unit 13 (optional), where
  • the obtaining unit 10 is configured to obtain a private network address; the media gateway controller usually obtains a private network address of the calling party by using a Session Description Protocol (SDP) of a signaling protocol message such as SIP, and the address needs to be NAT address mapping on the media gateway.
  • SDP Session Description Protocol
  • the first sending unit 11 is configured to send, to the media gateway, indication information that needs to establish a NAT address mapping, where the indication information includes a private network address that needs to be mapped by using a NAT address, and the indication information may further include a network on the private network side.
  • the indication information may further include a public network address that performs NAT mapping with the private network address, so as to implement the purpose of the media gateway controller for forcibly controlling the NAT mapping item.
  • the identifier of the network interface on the private network side and the identifier of the network interface on the public network side may also be implemented in advance.
  • the media gateway controller may use an extended attribute of a media gateway control protocol (H.248 or MGCP) to indicate that a new NAT address mapping is required, and the attribute may be a context attribute or a terminal attribute. Take the terminal attribute as an example, and add the attribute nmt.
  • the data type of this attribute is a string.
  • PrivateIterfaceID PrivateIPAddress,,r,PrivatePort”r,PublicIterfaceID. among them,
  • PrivatelterfacelD is the number of the private network interface
  • PrivatelPAddress is the IP address in the private network
  • PrivatePort is the port number in the private network
  • PublicIterfacelD is the number of the public network interface.
  • the media gateway After receiving the indication information of the media gateway controller, the media gateway maps the public network address to the media gateway controller in the response message.
  • the format of the attribute nmt is:
  • PublicIPAddress'l This format gives the mapped public network address.
  • the public network address indicating the destination needs to be added to the message sent by the media gateway controller to the media gateway.
  • the format of the attribute nmt is: PrivateIterfaceID'1'TrivateIPAddress"r'PrivatePort''l''PublicIterfaceID"r'PublicI PAddress"!PublicPort"l"DestinationIPAddress"l" DestinationPort. among them:
  • PrivatelterfacelD is the number of the private network interface
  • PrivatelPAddress is the IP address in the private network
  • PrivatePort is the port number in the private network
  • PublicIterfacelD is the number of the public network interface
  • PublicIPAddress is the IP address in the public network
  • PublicPort is the port number in the public network
  • DestinationlPAddress is the destination address of the IP packet in the public network.
  • DestinationPort is the destination port of IP packets in the public network.
  • the parameter nmt can also be defined as a string list format, which implements multiple NAT address mappings at a time.
  • the parameter nmt may further define a public network address carrying item, and send a public network address that is mapped to the private network address to the media gateway, so as to implement the purpose of the media gateway controller forcibly controlling the NAT mapping item.
  • the indication information that is sent by the first sending unit 11 to the media gateway may further include at least one of NAT deletion indication information, NAT type indication information, and NAT keep-alive duration indication information.
  • the NAT type indication information and the NAT keep-alive duration indication information may be delivered simultaneously with the indication information or the NAT deletion indication information that needs to be set up for the NAT address mapping, or may be delivered separately.
  • the NAT type indication is used to indicate the type of the NAT mapping address.
  • the media gateway controller may use an attribute of the extended H.248 protocol to indicate the NAT type, and the attribute may be a context attribute or a terminal attribute. Take the terminal attribute as an example. Add the attribute nattype, which is an enumeration type.
  • the optional values include the above four NAT address types and non-NAT types.
  • the NAT keepalive duration indication is used to indicate the keepalive duration of the NAT.
  • the media gateway controller may use an attribute of the extended H.248 protocol to indicate a NAT keepalive duration, where the attribute may be a context. Attribute or terminal attribute. Take the terminal attribute as an example, add the attribute kad, the data type can be an integer, and the unit can be milliseconds.
  • the media gateway after receiving the NAT deletion indication information sent by the media gateway controller, the media gateway deletes the NAT address mapping according to the NAT deletion indication information, where the NAT deletion indication information is used to instruct the media gateway to delete the NAT address mapping, and the specific implementation is implemented.
  • the media gateway controller may use an attribute of the extended H.248 protocol for the NAT deletion indication, which may be a context attribute or a End attribute. Taking the terminal attribute as an example, a new attribute natds is added, which can be defined in a string format to describe the deleted NAT address mapping. When a certain NAT address mapping is no longer used, the media gateway controller may instruct the media gateway to delete the NAT address mapping. For example, when the media gateway learns from the signaling message that the call ends, the call-related NAT address mapping may be actively deleted. Natds can also be defined as a string list format, enabling multiple NAT address mappings to be deleted at one time.
  • the storage unit 12 is configured to store a NAT address mapping, and the NAT address mapping entries may be stored in the storage unit 12 in the form of a NAT address mapping table.
  • the first receiving unit 13 is configured to receive a NAT address mapping creation response sent by the media gateway 2.
  • the media gateway returns the result of the NAT address mapping to the media gateway controller in the response message.
  • the response message may carry the public network address mapped by the NAT address, and the media gateway controller obtains the NAT address mapping.
  • the private network address before the NAT address mapping in the original signaling protocol message can be replaced by the address, thereby implementing NAT traversal and streamlining the signaling process.
  • the storage unit 12 further stores the received NAT address mapping entry.
  • the media gateway 2 includes a second receiving unit 20, a creating unit 21, a deleting unit 22 (optional), and a second sending unit 23 (optional), where
  • the second receiving unit 20 is configured to receive indication information that is sent by the media gateway controller 1 to establish a NAT address mapping.
  • the second receiving unit 20 receives various information sent by the first sending unit 11, and includes: indication information for establishing NAT address mapping, NAT deletion indication information, NAT type indication information, and NAT keep-alive duration indication. Information, etc.
  • the creating unit 21 is configured to establish, according to the received indication information that the NAT address mapping needs to be established, to establish a NAT address mapping between the private network address and the public network address. As described above, the established NAT address mapping may be mapped.
  • the form of the table exists.
  • the NAT address mapping parameter and the NAT address mapping entry established by the media gateway 2 when the NAT type is any one of a Full Cone, a Restricted Cone, and a Port Restricted Cone Examples are as follows:
  • NAT address mapping parameter When the NAT type is Symmetric, the NAT address mapping parameter and the media gateway 2 An example of a NAT address mapping entry is as follows:
  • PrivateIterfaceID '1'TrivateIPAddress "r'PrivatePort''l''PublicIterfaceID''r'PublicI PAddress'l” PublicPort"l"DestinationIPAddress"l" DestinationPort.
  • the deleting unit 22 is configured to delete the NAT address mapping on the media gateway 2. After the media gateway receives the NAT deletion indication information sent by the media gateway controller, the deleting unit 22 may delete the NAT address mapping according to the NAT deletion indication information. In a specific implementation, the deleting unit 22 may also actively delete the NAT address mapping. In this case, the deleting unit 22 further includes a determining unit and a time limit defined by the deleting time length; and the deleting subunit is configured to delete the NAT address mapping that exceeds the keep-alive duration when the determining result of the determining unit is yes;
  • the second sending unit 23 is configured to send the NAT response information to the media gateway controller 1, send the NAT address mapping established by the creating unit 21 to the media gateway controller 1, and/or to the media gateway.
  • the controller 1 reports the NAT deletion information, and sends the NAT address mapping deleted by the deleting unit 22 to the media gateway controller 1.
  • the media gateway 2 carries the attribute nmt in the response message to the media gateway controller 1 after the private network address maps the public network address on the specified interface.
  • the format of the attribute nmt is:
  • PublicIPAddress'l This format gives the mapped public network address.
  • an event of the H.248 protocol may be extended for the NAT deletion indication, and the event may be a context event or a terminal event. Take the terminal event as an example, add a natdr event. The event carries the information of the deleted NAT address mapping by parameters.
  • the media gateway controller 1 and the media gateway 2 establish a NAT address mapping between the private network address and the public network address for the specific private network address, if the NAT type is Port Restricted Cone, if the NAT address mapping entry exists for the private network
  • the address and port addrl:portl maps to the address of the public network and the port addr2:port2.
  • the media gateway receives the IP packet from the public network whose source address is addr3 (no matter which port) on addr2:port2, it must first judge Whether to forward the IP packet sent from addrl:portl to addr3 (no matter which port), if there is, the media gateway will send the IP packet received on addr2:port2 to addrl :portl, otherwise it will not forward .
  • the media gateway needs to save the destination address information sent from the private network to the public network on all address mapping items.
  • the Media Gateway Controller 1 can also be obtained by the Extended Media Gateway Control Protocol (H.248 or MGCP). Modify this information.
  • the Restricted Cone type NAT needs to check whether there is an IP packet sent by the private network to a specific destination IP address and port.
  • the conditions of the Symmetric type of NAT are more stringent. The added constraints are: Different destination addresses are mapped to different NAT address mappings.
  • FIG. 2 is a schematic flowchart diagram of a first embodiment of a method for implementing NAT according to an embodiment of the present invention. As shown in FIG. 2, the method for implementing NAT in this embodiment,
  • step S300 the media gateway controller obtains a private network address.
  • the media gateway controller usually obtains the private network address of the calling party through the SDP of the signaling protocol message such as SIP, and the address needs to perform NAT address mapping on the media gateway.
  • step S301 the media gateway controller sends, to the media gateway, indication information that needs to establish a NAT address mapping
  • the indication information includes a private network address that needs to perform NAT address mapping, and may also include an identifier of the network interface on the private network side and an identifier of the network interface on the public network side. Further, the indication information may further include the private information.
  • the public address of the NAT address mapped by the network address is used to implement the purpose of forcibly controlling the NAT mapping entry by the media gateway controller. Specifically, the identifier of the network interface on the private network side and the identifier of the network interface on the public network side may also be implemented in advance. If there is only one private network interface or only one public network interface, the interface identifier may not be sent.
  • the extension of an H.248 attribute is used to indicate the requirement to create a new NAT address mapping, which can be a context attribute or a terminal attribute. Take the terminal attribute as an example, and add the attribute nmt.
  • the data type is a string.
  • the NAT type is any of Full Cone, Restricted Cone, and Port Restricted Cone
  • the format of the attribute value when it is delivered is:
  • PrivateIterfaceID PrivateIPAddress,,r,PrivatePort”r,PublicIterfaceID. among them:
  • PrivatelterfacelD is the number of the private network interface
  • PrivatelPAddress is the IP address in the private network
  • PrivatePort is the port number in the private network
  • PublicIterfacelD is the number of the public network interface
  • the media gateway After the media gateway maps the public network address on the specified interface, the media gateway carries the message to the media gateway controller in the response message.
  • the format of the attribute nmt is:
  • PublicIPAddress'l This format gives the mapped public network address.
  • the public network address indicating the destination needs to be added to the message sent by the media gateway controller to the media gateway.
  • the format of the parameter nmt is: PrivateIterfaceID'1'TrivateIPAddress"r'PrivatePort''l''PublicIterfaceID"r'PublicI PAddress"!PublicPort"l"DestinationIPAddress"l" DestinationPort. among them:
  • PrivatelterfacelD is the number of the private network interface
  • PrivatelPAddress is the IP address in the private network
  • PrivatePort is the port number in the private network
  • PublicIterfacelD is the number of the public network interface
  • PublicIPAddress is the IP address in the public network
  • PublicPort is the port number in the public network
  • DestinationlPAddress is the destination address of the IP packet in the public network.
  • DestinationPort is the destination port of IP packets in the public network.
  • the parameter nmt can also be defined as a string list format, which implements multiple NAT address mappings at a time.
  • the parameter nmt may further define a public network address carrying item, and send a public network address that is mapped to the private network address to the media gateway, so as to implement the purpose of the media gateway controller forcibly controlling the NAT mapping item.
  • the indication information that is sent by the first sending unit 11 to the media gateway may further include at least one of NAT deletion indication information, NAT type indication information, and NAT keep-alive duration indication information.
  • the NAT type indication information and the NAT keep-alive duration indication information may be delivered simultaneously with the indication information or the NAT deletion indication information that needs to be set up for the NAT address mapping, or may be delivered separately.
  • the NAT type indicates a type used to indicate a NAT mapping address, and an attribute of the extended H.248 protocol is used to indicate a NAT type, and the attribute may be a context attribute or a terminal attribute. Take the terminal attribute as an example.
  • the new attribute nattype is added to the enumeration type.
  • the optional values include the above four NAT address types and non-NAT types.
  • the NAT keepalive duration indication is used to indicate the keepalive duration of the NAT, and an attribute of the extended H.248 protocol is used to indicate a NAT keepalive duration, and the attribute may be a context attribute or a terminal attribute. Take the terminal attribute as an example, add the attribute kad, the data type can be an integer, and the unit can be milliseconds.
  • the NAT deletion indication information is used to indicate that the media gateway deletes the NAT address mapping, and may be used as a NAT deletion indication by extending an attribute of the H.248 protocol, and the attribute may be a context attribute or a terminal attribute. Taking the terminal attribute as an example, the attribute natds is added.
  • the media gateway controller can instruct the media gateway to delete it actively. For example, when the media gateway learns from the signaling message that the call ends, the call-related NAT address mapping may be actively deleted. Natds can also be defined as a string list format, enabling multiple NAT address mappings to be deleted at one time.
  • the media gateway receives the mapping of the NAT address that is sent by the media gateway controller, and the media gateway returns the mapping of the NAT address to the media gateway controller in the response message.
  • the response message may carry the public network address mapped by the NAT address.
  • the media gateway controller can replace the private network address before the mapping of the NAT address in the original signaling protocol message, thereby implementing NAT traversal and simplifying the signaling process. .
  • the media gateway controller can actively delete.
  • One possibility is that the call ends and the NAT address mapping for the call is no longer used.
  • the media gateway can also report the deletion of the existing NAT address mapping. For example, a NAT address mapping is automatically reported and deleted because the keepalive timer expires.
  • FIG. 3 is a schematic structural diagram of a second embodiment of a system for implementing NAT according to the present invention.
  • the system for implementing NAT in this embodiment includes a media gateway 6 and a media gateway controller 7; Receiving a media stream sent from the private network to the public network, and carrying according to the media stream
  • the media gateway controller 7 is configured to receive at least one of NAT enhancement information and NAT deletion information sent by the media gateway 6.
  • the media gateway 6 includes a first receiving unit 60, a creating unit 61, a deleting unit 62 (optional), and a sending unit 63 (optional), where
  • the first receiving unit 60 is configured to receive a media stream that is sent from the private network to the public network, where the creating unit 61 is configured to establish a NAT address mapping for the private network address in the media stream;
  • the established NAT address mapping can exist in the form of a mapping table.
  • the NAT type is any one of a Full Cone, a Restricted Cone, and a Port Restricted Cone
  • the NAT address mapping parameter and the NAT address mapping entry established by the creating unit 61 Examples are as follows:
  • the NAT address mapping parameter and the NAT address mapping table established by the media gateway 2 are as follows:
  • PrivateIterfaceID'1'rivateIPAddress "r'PrivatePort' , l' , PublicIterfaceID''r'PublicI PAddress'l”PublicPort”l"DestinationIPAddress"l" DestinationPort.
  • the deleting unit 62 is configured to delete the NAT address mapping on the media gateway 6.
  • the deleting unit 62 includes a determining unit and a deleting subunit, and the determining unit is configured to determine whether the NAT address mapping stored on the media network is Determining the time limit of the keep-alive duration; the deleting sub-unit, configured to delete the NAT address mapping that exceeds the keep-alive duration when the judgment result of the determining unit is YES;
  • the sending unit 63 is configured to report, to the media gateway controller 7, at least one of the established NAT address mapping and the deleted NAT address mapping.
  • the data type is a string.
  • Privatelterf AcD is the number of the private network interface
  • PrivatelPAddress is the IP address in the private network.
  • PrivatePort is the port number in the private network.
  • PublicIterfacelD is the number of the public network interface
  • PublicIPAddress is the IP address in the public network
  • PublicPort is the port number in the public network.
  • PrivatelterfacelD is the number of the private network interface
  • PrivatelPAddress is the IP address in the private network.
  • PrivatePort is the port number in the private network.
  • PublicIterfacelD is the number of the public network interface
  • PublicIPAddress is the IP address in the public network.
  • PublicPort is the port number in the public network
  • DestinationlPAddress is the destination address of the IP address in the public network.
  • the DestinationPort is the destination port of the IP address in the public network.
  • the data type of the parameter mpr can also be defined as a string list type, which is used to report multiple new NAT address mappings for an event.
  • Extended H.248 Event natdr reports the deleted NAT address mapping.
  • This event carries the parameter mpd and the data type is a string.
  • This parameter describes the deleted NAT address mapping.
  • This parameter can also be defined as a string list type, which is used to report multiple deleted NAT address mappings in one event.
  • the media gateway controller 7 includes: a second receiving unit 70 and a storage unit 71 (optional), where
  • the second receiving unit 70 is configured to receive a NAT address mapping established by the media gateway and/or a NAT address mapping deleted by the media gateway sent by the media gateway.
  • the storage unit 71 is configured to store a NAT address mapping.
  • FIG. 4 is a schematic flowchart diagram of a second embodiment of a method for implementing NAT according to an embodiment of the present invention. As shown in FIG. 4, the method for implementing NAT in this embodiment,
  • step S400 the media gateway receives the media stream sent from the private network to the public network; in step S401, the media gateway establishes a NAT address mapping for the private network address in the media stream; in step S402, the media gateway controls the media gateway.
  • the NAT address mapping created by the device is reported.
  • H.248 event natar reports a new NAT address mapping. This event carries the parameter mpr.
  • the data type is a string.
  • Privatelterf AcD is the number of the private network interface
  • PrivatelPAddress is the IP address in the private network
  • PrivatePort is the port number in the private network
  • PublicIterfacelD is the number of the public network interface
  • PublicIPAddress is the IP address in the public network
  • PublicPort is the port number in the public network.
  • the format of the parameter mpr is as follows:
  • PrivateIterfaceID '1'TrivateIPAddress "r'PrivatePort''l''PublicIterfaceID''r'PublicI PAddress”! PublicPort"l"DestinationIPAddress"l" DestinationPort.
  • PrivatelterfacelD is the number of the private network interface
  • PrivatelPAddress is the IP address in the private network
  • PrivatePort is the port number in the private network
  • PublicIterfacelD is the number of the public network interface
  • PublicIPAddress is the IP address in the public network
  • PublicPort is the port number in the public network
  • DestinationlPAddress is the destination address of the IP packet in the public network.
  • DestinationPort is the destination port of IP packets in the public network.
  • the data type of the parameter mpr can also be defined as a string list type, which is used to report multiple new NAT address mappings for an event.
  • step S403 the media gateway determines whether the established NAT address mapping entry exceeds the time defined by the keep-alive duration. If the determination is yes, step S404 is performed; if the determination is no, the NAT is retained; in step S404, the media gateway is performed.
  • the NAT deletion information is reported to the media gateway controller, where the NAT deletion information is used to instruct the media gateway controller to delete the NAT address mapping deleted by the media gateway. Extending the H.248 event natdr reports the deleted NAT address mapping. This event carries the parameter mpd and the data type is a string. This parameter describes the deleted NAT address mapping. This parameter can also be defined as a string list type, which is used to report multiple deleted NAT address mappings in one event.
  • Steps S403 and S404 are optional steps, and in some cases need not be performed.
  • the media gateway controller may actively delete the NAT address mapping without requiring the media gateway to spontaneously determine the deletion.
  • the media gateway when receiving the NAT address mapping indication information sent by the media gateway controller or receiving the media stream sent from the private network to the public network, the media gateway establishes a NAT address mapping between the private network address and the public network address, thereby NAT is implemented on the media gateway, so that the media gateway can forward and forward IP packets between the public network and the private network.
  • the above two embodiments can coexist at the same time.
  • the difference between these two embodiments lies mainly in the method of generating NAT address mapping.
  • the NAT address mapping can be deleted by the media gateway controller or deleted by the media gateway.
  • the media gateway controller can set the NAT type and/or keep-alive duration to the media gateway. This setting can be a media network Off level, or interface level, or NAT address mapping level.
  • the present invention can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is a better implementation. the way.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer.
  • a hard disk or optical disk or the like includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.

Landscapes

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

Abstract

A method, a Media Gateway Controller (MGC) and a Media Gateway (MG) for implementing Network Address Translation (NAT) are provided by the embodiments of the present invention. They include: MG establishes a NAT address map relationship between the private network address and the public network address when it receives the indication information of the NAT address map relationship sent by MGC or it receives the media stream sent from the private network to the public network. By implementing the embodiments of the present invention, NAT is realized on MG; thereby MG can route and forward the IP messages sent from the public network to the private network.

Description

一种实现 NAT的方法及装置 本申请要求于 2008年 03月 31日提交中国专利局、申请号为 200810027135.1 发明名称为 "一种实现 NAT的方法及装置" 的中国专利申请的优先权, 其全部 内容通过引用结合在本申请中。  The present invention claims the priority of the Chinese patent application entitled "A method and device for implementing NAT", which is submitted to the Chinese Patent Office on March 31, 2008, and whose application number is 200810027135.1. The content is incorporated herein by reference.
技术领域 Technical field
本发明涉及移动通信领域, 尤其涉及一种实现 NAT的方法及装置。 背景技术  The present invention relates to the field of mobile communications, and in particular, to a method and apparatus for implementing NAT. Background technique
下一代网络是基于时分复用的公共电话交换网与基于因特网协议 /异步传输 模式的分组网络相融合的产物, 它使得在同一网络上实现语音、 视频以及数据 等信息的综合业务成了可能。  The next-generation network is a product of a time-multiplexed public switched telephone network and a packet network based on the Internet Protocol/Asynchronous Transfer Mode, which enables integrated services for voice, video and data on the same network.
下一代网络主要包括媒体网关 (Media Gateway, MG ) 和媒体网关控制器 ( Media Gateway Controller, MGC )。 其中, MGC主要负责业务控制功能, MG 主要负责媒体承载功能。 MGC和 MG形成的网关分离架构, 实现了业务控制平 面和媒体承载平面的分离, 从而可充分共享网络资源, 简化设备升级和业务扩 展, 降低开发和维护成本。  Next generation networks mainly include Media Gateway (MG) and Media Gateway Controller (MGC). Among them, MGC is mainly responsible for service control functions, and MG is mainly responsible for media bearer functions. The gateway separation architecture formed by the MGC and the MG realizes the separation of the service control plane and the media bearer plane, thereby fully sharing network resources, simplifying equipment upgrade and service expansion, and reducing development and maintenance costs.
媒体网关可以在不同的 IP网络中作为边界网关使用,用于实现不同 IP网络 中的媒体流传递。 当媒体网关作为边界网关时, 通常情况下使用背靠背的方式, 具体的, 在两个 IP网络中分别创建各自的 IP终端, 用于在这两个 IP网络建立 媒体流通道。 在媒体网关内部将这两个 IP终端放在同一个上下文中, 从而建立 完整的媒体流传递通道, 使媒体流能够穿过这两个 IP网络。 但在这种方式下, 媒体流经过媒体网关时需要修改源地址和目的地址。 还有一种方式是媒体网关 实现路由功能, 媒体流通过媒体网关时不修改源地址和目的地址, 依靠媒体网 关内的路由表格, 通过目的地址来寻找出接口以及下一跳的地址。 但是后一种 方式无法解决两个 IP网络中至少有一个是私有网络的问题。 因此, 现有技术媒 体网关无法对公有网络发往私有网络的 IP报文进行路由转发。 发明内容 The media gateway can be used as a border gateway in different IP networks to implement media stream delivery in different IP networks. When the media gateway is used as the border gateway, the back-to-back mode is usually used. Specifically, the IP terminals are respectively created in the two IP networks, and the media stream channels are established on the two IP networks. The two IP terminals are placed in the same context inside the media gateway, thereby establishing a complete media stream delivery channel, so that the media stream can pass through the two IP networks. However, in this mode, the source address and the destination address need to be modified when the media stream passes through the media gateway. Another way is that the media gateway implements the routing function. When the media stream passes through the media gateway, the source address and the destination address are not modified, and the routing table in the media gateway is used to find the outbound interface and the address of the next hop through the destination address. However, the latter method cannot solve the problem that at least one of the two IP networks is a private network. Therefore, the prior art media gateway cannot forward and forward IP packets sent by the public network to the private network. Summary of the invention
本发明实施例所要解决的技术问题在于, 提供一种实现网络地址转换 The technical problem to be solved by the embodiments of the present invention is to provide a network address translation
(Network Address Translation, NAT)的方法及装置, 使得媒体网关能在公有网络 和私有网络之间进行 IP报文的路由转发。 The method and device of the network address translation (NAT) enable the media gateway to forward and forward IP packets between the public network and the private network.
为了解决上述技术问题, 一方面, 本发明实施例提供了一种实现 NAT的方 法, 该方法包括:  In order to solve the above technical problem, in an aspect, an embodiment of the present invention provides a method for implementing NAT, where the method includes:
媒体网关接收到媒体网关控制器发送的需建立 NAT地址映射的指示信息或 接收到从私有网络发送至公有网络的媒体流时 , 建立私有网络地址与公有网絡 地址间的 NAT地址映射。  The media gateway establishes a NAT address mapping between the private network address and the public network address when receiving the indication information to be established by the media gateway controller to establish a NAT address mapping or receiving the media stream sent from the private network to the public network.
相应的, 本发明的实施例提供了一种媒体网关, 包括:  Correspondingly, an embodiment of the present invention provides a media gateway, including:
接收单元, 用于接收媒体网关控制器发送的需建立 NAT地址映射指示信息 或接收从私有网絡发送至公有网络的媒体流;  a receiving unit, configured to receive, by the media gateway controller, a NAT address mapping indication information to be established or a media stream that is sent from the private network to the public network;
创建单元, 用于根据所述 NAT地址映射指示信息或所述从私有网络发送至 相应的, 本发明的实施例还提供了一种媒体网关控制器, 所述媒体网关控 制器包括:  The creating unit is configured to send, according to the NAT address mapping indication information, or the foregoing from the private network to the corresponding, the embodiment of the present invention further provides a media gateway controller, where the media gateway controller includes:
发送单元, 用于向媒体网关发送需建立 NAT地址映射的指示信息。  And a sending unit, configured to send, to the media gateway, indication information that needs to establish a NAT address mapping.
在本发明的实施例中, 媒体网关接收到媒体网关控制器发送的 NAT地址映 射指示信息或接收到从私有网络发送至公有网络的媒体流时, 建立私有网络地 址与公有网络地址间的 NAT地址映射,从而在媒体网关上实现了 NAT , 使得媒 体网关能对公有网络发往私有网络的 IP报文进行路由转发。 附图说明  In the embodiment of the present invention, when the media gateway receives the NAT address mapping indication information sent by the media gateway controller or receives the media stream sent from the private network to the public network, establishing a NAT address between the private network address and the public network address. The mapping is implemented to implement NAT on the media gateway, so that the media gateway can forward and forward IP packets sent by the public network to the private network. DRAWINGS
图 1是本发明实现 NAT的***的第一实施例结构组成示意图;  1 is a schematic structural diagram of a first embodiment of a system for implementing NAT according to the present invention;
图 2是本发明实现 NAT的方法的第一实施例流程示意图;  2 is a schematic flow chart of a first embodiment of a method for implementing NAT according to the present invention;
图 3是本发明实现 NAT的***的第二实施例结构组成示意图;  3 is a schematic structural diagram of a second embodiment of a system for implementing NAT according to the present invention;
图 4 是本发明实现 NAT的方法的第二实施例流程示意图。 具体实施方式  4 is a schematic flow chart of a second embodiment of a method for implementing NAT according to the present invention. detailed description
为使本发明实施例更加清楚, 首先需要介绍网络地址转换 (Network Address Translation, NAT)技术。 In order to make the embodiment of the present invention clearer, it is first necessary to introduce network address translation (Network Address). Translation, NAT) technology.
NAT是一种用于将一个地址域, 如专用内联网 (Intranet )地址域映射为另 一个地址域, 如互联网 (Internet )地址域的标准的技术。 NAT是 Internet的一个 标准, NAT设备位于专用网即私有网络和公有网络的边界处。 当专用网发出的 IP数据分组到达 NAT设备时, NAT设备负责将内部专用网 IP地址转换成公有 网络的合法 IP地址, 也就是说将内部专用网 IP地址映射 (mapping ) 到公有网 絡的合法 IP地址, 形成网络地址转换地址映射记录 (NAT地址映射记录); NAT 设备上的网络地址转换地址映射表 ( AT地址映射表 )汇总了该 NAT上的 NAT 地址映射记录;每条 NAT地址映射记录也就是 AT地址映射表中的一个网络地 址转换地址映射项 (NAT地址映射项); 当有外部发来的数据分组到达 NAT设备 后, NAT设备通过查阅 NAT保存的 NAT地址映射表里的信息, 将公有网络地 址转换成专用网地址, 再转发到内部接收点。 如果是基本 NAT ( Basic NAT ), NAT地址映射表中保存的是内部网络和外部网络的 IP地址的映射关系; 如果是 网络地址端口转换( Network Address Port Translation, NAPT ), 则 NAT地址映 射表中保存的是内部网络的 IP地址加端口和外部网络的 IP地址加端口的映射关 系。 基本 NAT和 NAPT统称为传统 NAT ( Traditional NAT )。  NAT is a standard technique for mapping an address domain, such as a private intranet (Address) address domain, to another address domain, such as an Internet (Internet) address domain. NAT is a standard for the Internet. The NAT device is located at the boundary of the private network and the public network. When the IP data packet sent by the private network arrives at the NAT device, the NAT device is responsible for converting the internal private network IP address into the legal IP address of the public network, that is, mapping the internal private network IP address to the legal IP of the public network. Address, forming a network address translation address mapping record (NAT address mapping record); a network address translation address mapping table (AT address mapping table) on the NAT device summarizes the NAT address mapping record on the NAT; each NAT address mapping record is also Is a network address translation address mapping entry (NAT address mapping entry) in the AT address mapping table; when an externally sent data packet arrives at the NAT device, the NAT device consults the information in the NAT address mapping table saved by the NAT, The public network address is translated into a private network address and forwarded to the internal receiving point. If it is a basic NAT, the NAT address mapping table stores the mapping relationship between the internal network and the IP address of the external network. If it is a Network Address Port Translation (NAPT), the NAT address mapping table is used. The IP address of the internal network plus the mapping between the IP address of the internal network and the port is saved. Basic NAT and NAPT are collectively referred to as Traditional NAT.
NAT 分为 4 种类型, 即 Full Cone (全锥)、 Restricted Cone (限制锥)、 Port Restricted Cone (端口限制锥)和 Symmetric (对称)。 前面三种类型, 统称为 Cone NAT (锥网络地址转换), 有一个共同点: 只要是从同一个内部 IP地址和端口出 来的包, NAT都将它转换成同一个外部 IP地址和端口。 但是 Symmetric有点不 同, 具体表现在: 只有从同一个内部 IP地址和端口发出, 且发往同一个外部目 的 IP地址和端口, NAT才将该内部 IP地址和端口转换成同一个外部 IP地址和 端口。 从同一个内部地址和端口发出, 但是发往到另一个外部目的 IP目标地址 和端口, 则 NAT将使用不同的映射, 该内部 IP地址和端口将被转换成不同的外 部 IP地址和端口。  NAT is divided into 4 types, namely Full Cone, Restricted Cone, Port Restricted Cone, and Symmetric. The first three types, collectively called Cone NAT, have one thing in common: NAT translates it into the same external IP address and port as long as it is a packet from the same internal IP address and port. However, Symmetric is a bit different, as follows: Only when it is sent from the same internal IP address and port and sent to the same external destination IP address and port, NAT translates the internal IP address and port into the same external IP address and port. . From the same internal address and port, but to another external destination IP destination address and port, the NAT will use a different mapping, the internal IP address and port will be converted to a different external IP address and port.
下面参考附图对本发明的实施例进行详细描述。  Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
图 1是本发明实现 NAT的***的第一实施例结构组成示意图;如图 1所示, 本实施例的实现 NAT的***包括媒体网关控制器 1和媒体网关 2; 所述媒体网 关控制器 1用于***体网关 2实现 NAT功能; 所述媒体网关 2用于当接收到 所述媒体网关控制器 1发送的需建立 NAT地址映射的指示信息时, 建立私有网 络地址与公有网络地址间的 NAT地址映射。 进一步, 仍参考图 1 , 所述媒体网 关控制器 1包括获取单元 10 (可选)、 第一发送单元 11、 存储单元 12 (可选) 以及第一接收单元 13 (可选) , 其中, 1 is a schematic structural diagram of a first embodiment of a system for implementing NAT according to the present invention; as shown in FIG. 1, the system for implementing NAT in this embodiment includes a media gateway controller 1 and a media gateway 2; The media gateway 2 is configured to implement the NAT function. The media gateway 2 is configured to establish a private network when receiving the indication information that needs to be established by the media gateway controller 1 to establish a NAT address mapping. NAT address mapping between the network address and the public network address. Further, still referring to FIG. 1, the media gateway controller 1 includes an obtaining unit 10 (optional), a first sending unit 11, a storage unit 12 (optional), and a first receiving unit 13 (optional), where
所述获取单元 10, 用于获取私有网络地址; 媒体网关控制器通常都是通过 SIP等信令协议消息的会话描述协议 (Session Description Protocol, SDP)获得呼 叫方的私有网络地址, 该地址需要在媒体网关上进行 NAT地址映射。  The obtaining unit 10 is configured to obtain a private network address; the media gateway controller usually obtains a private network address of the calling party by using a Session Description Protocol (SDP) of a signaling protocol message such as SIP, and the address needs to be NAT address mapping on the media gateway.
所述第一发送单元 11 ,用于向媒体网关发送需建立 NAT地址映射的指示信 息, 所述指示信息包括需要进行 NAT地址映射的私有网絡地址, 所述指示信息 还可以包括私有网络侧的网络接口的标识和公有网络侧的网络接口的标识, 更 进一步, 所述指示信息还可以包括与所述私网地址进行 NAT映射的公网地址, 以实现媒体网关控制器强制控制 NAT映射项的目的。 具体的, 所述私有网络侧 的网络接口的标识和公有网絡侧的网络接口的标识也可以预先通过配置实现, 如果只有一个私有网络接口或者只有一个公有网络接口, 则也可不发送接口标 识。 具体实现中, 媒体网关控制器可通过扩展的一个媒体网关控制协议(H.248 或 MGCP ) 的属性用于指示要求创建新的 NAT地址映射, 该属性可以是上下文 属性或者终端属性。 以终端属性为例, 新增属性 nmt。 该属性的数据类型为字符 串。 当 NAT类型为 Full Cone (全锥)、 Restricted Cone (限制锥) 以及 Port Restricted Cone (端口限制锥 )中任一个时,媒体网关控制器下发该 nmt属性时, 该 nmt属性值的格式为:  The first sending unit 11 is configured to send, to the media gateway, indication information that needs to establish a NAT address mapping, where the indication information includes a private network address that needs to be mapped by using a NAT address, and the indication information may further include a network on the private network side. The identifier of the interface and the identifier of the network interface on the public network side. Further, the indication information may further include a public network address that performs NAT mapping with the private network address, so as to implement the purpose of the media gateway controller for forcibly controlling the NAT mapping item. . Specifically, the identifier of the network interface on the private network side and the identifier of the network interface on the public network side may also be implemented in advance. If there is only one private network interface or only one public network interface, the interface identifier may not be sent. In a specific implementation, the media gateway controller may use an extended attribute of a media gateway control protocol (H.248 or MGCP) to indicate that a new NAT address mapping is required, and the attribute may be a context attribute or a terminal attribute. Take the terminal attribute as an example, and add the attribute nmt. The data type of this attribute is a string. When the NAT type is any of the Full Cone, the Restricted Cone, and the Port Restricted Cone, when the media gateway controller issues the nmt attribute, the format of the nmt attribute value is:
PrivateIterfaceID"r,PrivateIPAddress,,r,PrivatePort"r,PublicIterfaceID。 其中, PrivateIterfaceID"r, PrivateIPAddress,,r,PrivatePort"r,PublicIterfaceID. among them,
PrivatelterfacelD为私有网络接口的编号; PrivatelterfacelD is the number of the private network interface;
PrivatelPAddress为私有网络中的 IP地址;  PrivatelPAddress is the IP address in the private network;
PrivatePort为私有网络中的端口号;  PrivatePort is the port number in the private network;
PublicIterfacelD为公有网络接口的编号。  PublicIterfacelD is the number of the public network interface.
媒体网关接收到媒体网关控制器的指示信息后, 为该私有网络地址在指定 的接口上映射出公有网络地址后在应答消息中携带给媒体网关控制器。 在应答 消息中, 属性 nmt的格式为:  After receiving the indication information of the media gateway controller, the media gateway maps the public network address to the media gateway controller in the response message. In the response message, the format of the attribute nmt is:
PublicIPAddress'l" PublicPort, 该格式给出了映射后的公有网络地址。  PublicIPAddress'l" PublicPort, this format gives the mapped public network address.
当 NAT类型为 Symmetric时, 在媒体网关控制器发送给媒体网关的消息中 需要增加指示目的公有网络地址。 属性 nmt的格式为: PrivateIterfaceID'1'TrivateIPAddress"r'PrivatePort''l''PublicIterfaceID"r'PublicI PAddress"!" PublicPort"l"DestinationIPAddress"l" DestinationPort。 其中: When the NAT type is Symmetric, the public network address indicating the destination needs to be added to the message sent by the media gateway controller to the media gateway. The format of the attribute nmt is: PrivateIterfaceID'1'TrivateIPAddress"r'PrivatePort''l''PublicIterfaceID"r'PublicI PAddress"!"PublicPort"l"DestinationIPAddress"l" DestinationPort. among them:
PrivatelterfacelD为私有网络接口的编号;  PrivatelterfacelD is the number of the private network interface;
PrivatelPAddress为私有网络中的 IP地址;  PrivatelPAddress is the IP address in the private network;
PrivatePort为私有网络中的端口号;  PrivatePort is the port number in the private network;
PublicIterfacelD为公有网络接口的编号;  PublicIterfacelD is the number of the public network interface;
PublicIPAddress为公有网络中的 IP地址;  PublicIPAddress is the IP address in the public network;
PublicPort为公有网络中的端口号;  PublicPort is the port number in the public network;
DestinationlPAddress为公有网络中 IP报文的目的地址;  DestinationlPAddress is the destination address of the IP packet in the public network.
DestinationPort为公有网絡中 IP报文的目的端口。  DestinationPort is the destination port of IP packets in the public network.
参数 nmt还可以被定义成字符串列表的格式, 实现一次增加多个 NAT地址 映射。  The parameter nmt can also be defined as a string list format, which implements multiple NAT address mappings at a time.
具体实现中, 参数 nmt还可以进一步定义公网地址携带项, 将与所述私网 地址进行 NAT映射的公网地址发送给媒体网关, 以实现媒体网关控制器强制控 制 NAT映射项的目的。  In the specific implementation, the parameter nmt may further define a public network address carrying item, and send a public network address that is mapped to the private network address to the media gateway, so as to implement the purpose of the media gateway controller forcibly controlling the NAT mapping item.
具体实现中, 所述第一发送单元 11 向媒体网关发送的指示信息还可包括 NAT删除指示信息, NAT类型指示信息、 NAT保活时长指示信息中至少一种。 NAT类型指示信息和 NAT保活时长指示信息可以和需建立 NAT地址映射的指 示信息或 NAT删除指示信息同时下发,也可以单独下发。所述 NAT类型指示用 于指示 NAT映射地址的类型,具体实现中,媒体网关控制器可通过扩展的 H.248 协议的一个属性用于指示 NAT类型, 该属性可以是上下文属性或者终端属性。 以终端属性为例, 新增属性 nattype, 取值为枚举型, 可选值包括以上四种 NAT 地址类型以及非 NAT类型。 所述 NAT保活时长指示用于指示所述 NAT的保活 时长, 具体实现中, 媒体网关控制器可通过扩展的 H.248 协议的一个属性用于 指示 NAT保活时长,该属性可以是上下文属性或者终端属性。 以终端属性为例, 新增属性 kad, 数据类型可为整数, 单位可为毫秒。  In a specific implementation, the indication information that is sent by the first sending unit 11 to the media gateway may further include at least one of NAT deletion indication information, NAT type indication information, and NAT keep-alive duration indication information. The NAT type indication information and the NAT keep-alive duration indication information may be delivered simultaneously with the indication information or the NAT deletion indication information that needs to be set up for the NAT address mapping, or may be delivered separately. The NAT type indication is used to indicate the type of the NAT mapping address. In a specific implementation, the media gateway controller may use an attribute of the extended H.248 protocol to indicate the NAT type, and the attribute may be a context attribute or a terminal attribute. Take the terminal attribute as an example. Add the attribute nattype, which is an enumeration type. The optional values include the above four NAT address types and non-NAT types. The NAT keepalive duration indication is used to indicate the keepalive duration of the NAT. In a specific implementation, the media gateway controller may use an attribute of the extended H.248 protocol to indicate a NAT keepalive duration, where the attribute may be a context. Attribute or terminal attribute. Take the terminal attribute as an example, add the attribute kad, the data type can be an integer, and the unit can be milliseconds.
进一步, 媒体网关接收到媒体网关控制器发送的 NAT删除指示信息后, 根 据所述 NAT删除指示信息删除所述 NAT地址映射, 所述 NAT删除指示信息用 于指示媒体网关删除 NAT地址映射, 具体实现中, 媒体网关控制器可通过扩展 的 H.248协议的一个属性用于 NAT删除指示, 该属性可以是上下文属性或者终 端属性。 以终端属性为例, 新增属性 natds , 该属性可以被定义成字符串格式, 描述被删除的 NAT地址映射。 当某个 NAT地址映射不再被使用,媒体网关控制 器可以指示媒体网关删除所述 NAT地址映射。 例如当媒体网关从信令消息中获 知呼叫结束时, 则可以主动删除该呼叫相关的 NAT地址映射。 natds还可以被定 义成字符串列表的格式, 实现一次删除多个 NAT地址映射。 Further, after receiving the NAT deletion indication information sent by the media gateway controller, the media gateway deletes the NAT address mapping according to the NAT deletion indication information, where the NAT deletion indication information is used to instruct the media gateway to delete the NAT address mapping, and the specific implementation is implemented. The media gateway controller may use an attribute of the extended H.248 protocol for the NAT deletion indication, which may be a context attribute or a End attribute. Taking the terminal attribute as an example, a new attribute natds is added, which can be defined in a string format to describe the deleted NAT address mapping. When a certain NAT address mapping is no longer used, the media gateway controller may instruct the media gateway to delete the NAT address mapping. For example, when the media gateway learns from the signaling message that the call ends, the call-related NAT address mapping may be actively deleted. Natds can also be defined as a string list format, enabling multiple NAT address mappings to be deleted at one time.
所述存储单元 12,用于存储 NAT地址映射, NAT地址映射项可汇总成 NAT 地址映射表的形式存储在所述存储单元 12中。  The storage unit 12 is configured to store a NAT address mapping, and the NAT address mapping entries may be stored in the storage unit 12 in the form of a NAT address mapping table.
所述第一接收单元 13 ,用于接收所述媒体网关 2发送的 NAT地址映射创建 应答。 具体实现中, 媒体网关将 NAT地址映射的结果在应答消息中返回给媒体 网关控制器。 当媒体网关控制器下发给媒体网关的需建立 NAT地址映射指示信 息中未包括公网地址时, 该应答消息中可携带 NAT地址映射后的公网地址, 媒 体网关控制器获得了 NAT地址映射后的公有网络地址后 , 可以用该地址替换原 有信令协议消息中的 NAT地址映射前的私有网络地址,从而实现了 NAT的穿越, 筒化了信令流程。 所述存储单元 12进一步将所述接收到的 NAT地址映射项进 行存储。  The first receiving unit 13 is configured to receive a NAT address mapping creation response sent by the media gateway 2. In a specific implementation, the media gateway returns the result of the NAT address mapping to the media gateway controller in the response message. When the media gateway controller sends the NAT address mapping indication information to the media gateway that does not include the public network address, the response message may carry the public network address mapped by the NAT address, and the media gateway controller obtains the NAT address mapping. After the public network address is used, the private network address before the NAT address mapping in the original signaling protocol message can be replaced by the address, thereby implementing NAT traversal and streamlining the signaling process. The storage unit 12 further stores the received NAT address mapping entry.
相应的, 所述媒体网关 2包括第二接收单元 20、 创建单元 21、 删除单元 22 (可选)、 以及第二发送单元 23 (可选), 其中,  Correspondingly, the media gateway 2 includes a second receiving unit 20, a creating unit 21, a deleting unit 22 (optional), and a second sending unit 23 (optional), where
所述第二接收单元 20, 用于接收所述媒体网关控制器 1发送的需建立 NAT 地址映射的指示信息。 具体实现中所述第二接收单元 20接收所述第一发送单元 11发送的各种信息, 包括, 需建立 NAT地址映射的指示信息、 NAT删除指示信 息、 NAT类型指示信息以及 NAT保活时长指示信息等。  The second receiving unit 20 is configured to receive indication information that is sent by the media gateway controller 1 to establish a NAT address mapping. In the specific implementation, the second receiving unit 20 receives various information sent by the first sending unit 11, and includes: indication information for establishing NAT address mapping, NAT deletion indication information, NAT type indication information, and NAT keep-alive duration indication. Information, etc.
所述创建单元 21 , 用于根据所述接收的需建立 NAT地址映射的指示信息, 建立私有网络地址与公有网络地址间的 NAT地址映射, 如前所述, 所述建立的 NAT地址映射可以映射表的形式存在。当 NAT类型为 Full Cone(全锥)、 Restricted Cone (限制锥 )以及 Port Restricted Cone (端口限制锥 ) 中任一个时, 所述 NAT 地址映射参数以及所述媒体网关 2建立的 NAT地址映射表项举例如下:  The creating unit 21 is configured to establish, according to the received indication information that the NAT address mapping needs to be established, to establish a NAT address mapping between the private network address and the public network address. As described above, the established NAT address mapping may be mapped. The form of the table exists. The NAT address mapping parameter and the NAT address mapping entry established by the media gateway 2 when the NAT type is any one of a Full Cone, a Restricted Cone, and a Port Restricted Cone Examples are as follows:
表项格式:  Entry format:
PrivateIterfaceID'1' rivateIPAddress'1' rivatePort''r'PublicIterfaceID''l''PublicI PAddress'l" PublicPort。  PrivateIterfaceID'1' rivateIPAddress'1' rivatePort''r'PublicIterfaceID''l''PublicI PAddress'l" PublicPort.
当 NAT类型为 Symmetric时, 所述 NAT地址映射参数以及所述媒体网关 2 建立的 NAT地址映射表项举例如下: When the NAT type is Symmetric, the NAT address mapping parameter and the media gateway 2 An example of a NAT address mapping entry is as follows:
表项格式:  Entry format:
PrivateIterfaceID'1'TrivateIPAddress"r'PrivatePort''l''PublicIterfaceID''r'PublicI PAddress'l" PublicPort"l"DestinationIPAddress"l" DestinationPort。  PrivateIterfaceID '1'TrivateIPAddress"r'PrivatePort''l''PublicIterfaceID''r'PublicI PAddress'l" PublicPort"l"DestinationIPAddress"l" DestinationPort.
所述删除单元 22, 用于删除媒体网关 2上的 NAT地址映射。 媒体网关接收 到媒体网关控制器发送的 NAT删除指示信息后, 所述删除单元 22可根据所述 NAT删除指示信息删除所述 NAT地址映射。 具体实现中, 所述删除单元 22还 可主动删除 NAT地址映射。 此时, 所述删除单元 22进一步包括判断单元和删 时长限定的时间; 所述删除子单元, 用于在所述判断单元的判断结果为是时, 删除超过保活时长的 NAT地址映射;  The deleting unit 22 is configured to delete the NAT address mapping on the media gateway 2. After the media gateway receives the NAT deletion indication information sent by the media gateway controller, the deleting unit 22 may delete the NAT address mapping according to the NAT deletion indication information. In a specific implementation, the deleting unit 22 may also actively delete the NAT address mapping. In this case, the deleting unit 22 further includes a determining unit and a time limit defined by the deleting time length; and the deleting subunit is configured to delete the NAT address mapping that exceeds the keep-alive duration when the determining result of the determining unit is yes;
所述第二发送单元 23, 用于向所述媒体网关控制器 1发送 NAT应答信息, 将所述创建单元 21建立的 NAT地址映射发送给媒体网关控制器 1 , 和 /或用于 向媒体网关控制器 1上报 NAT删除信息, 将所述删除单元 22删除的 NAT地址 映射发送给媒体网关控制器 1。 具体实现中, 媒体网关 2为该私有网络地址在指 定的接口上映射出公有网絡地址后在应答消息中的属性 nmt携带给媒体网关控 制器 1。 在应答消息中, 属性 nmt的格式为:  The second sending unit 23 is configured to send the NAT response information to the media gateway controller 1, send the NAT address mapping established by the creating unit 21 to the media gateway controller 1, and/or to the media gateway. The controller 1 reports the NAT deletion information, and sends the NAT address mapping deleted by the deleting unit 22 to the media gateway controller 1. In a specific implementation, the media gateway 2 carries the attribute nmt in the response message to the media gateway controller 1 after the private network address maps the public network address on the specified interface. In the response message, the format of the attribute nmt is:
PublicIPAddress'l" PublicPort, 该格式给出了映射后的公有网络地址。  PublicIPAddress'l" PublicPort, this format gives the mapped public network address.
具体实现中, 可通过扩展 H.248协议的一个事件用于 NAT删除指示, 该事 件可以是上下文事件或者终端事件。 以终端事件为例, 新增一个 natdr事件。 该 事件通过参数携带被删除的 NAT地址映射的信息。  In a specific implementation, an event of the H.248 protocol may be extended for the NAT deletion indication, and the event may be a context event or a terminal event. Take the terminal event as an example, add a natdr event. The event carries the information of the deleted NAT address mapping by parameters.
在媒体网关控制器 1和媒体网关 2为特定私有网地址建立好私有网络地址 与公有网络地址间的 NAT地址映射后, 如果 NAT类型是 Port Restricted Cone , 如果存在 NAT地址映射表项将私有网络的地址和端口 addrl:portl映射到公有网 络的地址和端口 addr2:port2 , 媒体网关在 addr2:port2上收到从公有网络的源地 址为 addr3(无论是哪个端口)的 IP 报文时, 先要判断之前是否转发过从 addrl:portl发送到 addr3(无论是哪个端口)的 IP报文, 如果有, 媒体网关则将在 addr2:port2上接收到的该 IP报文发送到 addrl :portl,否则不转发。 因此媒体网关 需要保存所有地址映射项上从私有网络发送到公有网络的目的地址信息。 也可 以通过扩展媒体网关控制协议( H.248或 MGCP )使媒体网关控制器 1获得或者 修改该信息。 同理, Restricted Cone类型的 NAT需要检查之前是否有私有网络 发往某个特定目的 IP地址和端口的 IP报文。 Symmetric类型的 NAT的条件更严 格, 增加的约束条件是: 不同的目的地址要映射出不同的 NAT地址映射。 After the media gateway controller 1 and the media gateway 2 establish a NAT address mapping between the private network address and the public network address for the specific private network address, if the NAT type is Port Restricted Cone, if the NAT address mapping entry exists for the private network The address and port addrl:portl maps to the address of the public network and the port addr2:port2. When the media gateway receives the IP packet from the public network whose source address is addr3 (no matter which port) on addr2:port2, it must first judge Whether to forward the IP packet sent from addrl:portl to addr3 (no matter which port), if there is, the media gateway will send the IP packet received on addr2:port2 to addrl :portl, otherwise it will not forward . Therefore, the media gateway needs to save the destination address information sent from the private network to the public network on all address mapping items. The Media Gateway Controller 1 can also be obtained by the Extended Media Gateway Control Protocol (H.248 or MGCP). Modify this information. Similarly, the Restricted Cone type NAT needs to check whether there is an IP packet sent by the private network to a specific destination IP address and port. The conditions of the Symmetric type of NAT are more stringent. The added constraints are: Different destination addresses are mapped to different NAT address mappings.
图 2是本发明实施例实现 NAT的方法的第一实施例流程示意图。 如图 2所 示, 本实施例的实现 NAT的方法,  FIG. 2 is a schematic flowchart diagram of a first embodiment of a method for implementing NAT according to an embodiment of the present invention. As shown in FIG. 2, the method for implementing NAT in this embodiment,
在步驟 S300, 媒体网关控制器获取私有网絡地址;  In step S300, the media gateway controller obtains a private network address.
媒体网关控制器通常都是通过 SIP等信令协议消息的 SDP获得呼叫方的私 有网络地址, 该地址需要在媒体网关上进行 NAT地址映射。  The media gateway controller usually obtains the private network address of the calling party through the SDP of the signaling protocol message such as SIP, and the address needs to perform NAT address mapping on the media gateway.
在步驟 S301 ,媒体网关控制器向媒体网关发送需建立 NAT地址映射的指示 信息;  In step S301, the media gateway controller sends, to the media gateway, indication information that needs to establish a NAT address mapping;
所述指示信息包括需要进行 NAT地址映射的私有网络地址, 还可以包括私 有网络侧的网络接口的标识和公有网络侧的网络接口的标识, 更进一步, 所述 指示信息还可以包括与所述私网地址进行 NAT映射的公网地址, 以实现媒体网 关控制器强制控制 NAT映射项的目的。 具体的, 所述私有网络侧的网络接口的 标识和公有网络侧的网络接口的标识也可以预先通过配置实现, 如果只有一个 私有网络接口或者只有一个公有网络接口, 则也可不发送接口标识。 扩展一个 H.248的属性用于指示要求创建新的 NAT地址映射, 该属性可以是上下文属性 或者终端属性。 以终端属性为例, 新增属性 nmt。 数据类型为字符串。 当 NAT 类型为 Full Cone (全锥)、 Restricted Cone (限制锥) 以及 Port Restricted Cone (端口限制锥) 中任一个时, 下发时该属性值的格式为:  The indication information includes a private network address that needs to perform NAT address mapping, and may also include an identifier of the network interface on the private network side and an identifier of the network interface on the public network side. Further, the indication information may further include the private information. The public address of the NAT address mapped by the network address is used to implement the purpose of forcibly controlling the NAT mapping entry by the media gateway controller. Specifically, the identifier of the network interface on the private network side and the identifier of the network interface on the public network side may also be implemented in advance. If there is only one private network interface or only one public network interface, the interface identifier may not be sent. The extension of an H.248 attribute is used to indicate the requirement to create a new NAT address mapping, which can be a context attribute or a terminal attribute. Take the terminal attribute as an example, and add the attribute nmt. The data type is a string. When the NAT type is any of Full Cone, Restricted Cone, and Port Restricted Cone, the format of the attribute value when it is delivered is:
PrivateIterfaceID"r,PrivateIPAddress,,r,PrivatePort"r,PublicIterfaceID。 其中: PrivateIterfaceID"r, PrivateIPAddress,,r,PrivatePort"r,PublicIterfaceID. among them:
PrivatelterfacelD为私有网络接口的编号; PrivatelterfacelD is the number of the private network interface;
PrivatelPAddress为私有网络中的 IP地址;  PrivatelPAddress is the IP address in the private network;
PrivatePort为私有网络中的端口号;  PrivatePort is the port number in the private network;
PublicIterfacelD为公有网络接口的编号;  PublicIterfacelD is the number of the public network interface;
媒体网关为该私有网络地址在指定的接口上映射出公有网络地址后在应答 消息中携带给媒体网关控制器。 在应答消息中, 属性 nmt的格式为:  After the media gateway maps the public network address on the specified interface, the media gateway carries the message to the media gateway controller in the response message. In the response message, the format of the attribute nmt is:
PublicIPAddress'l" PublicPort, 该格式给出了映射后的公有网络地址。  PublicIPAddress'l" PublicPort, this format gives the mapped public network address.
当 NAT类型为 Symmetric时, 在媒体网关控制器发送给媒体网关的消息中 需要增加指示目的公有网络地址。 参数 nmt的格式为: PrivateIterfaceID'1'TrivateIPAddress"r'PrivatePort''l''PublicIterfaceID"r'PublicI PAddress"!" PublicPort"l"DestinationIPAddress"l" DestinationPort。 其中: When the NAT type is Symmetric, the public network address indicating the destination needs to be added to the message sent by the media gateway controller to the media gateway. The format of the parameter nmt is: PrivateIterfaceID'1'TrivateIPAddress"r'PrivatePort''l''PublicIterfaceID"r'PublicI PAddress"!"PublicPort"l"DestinationIPAddress"l" DestinationPort. among them:
PrivatelterfacelD为私有网络接口的编号;  PrivatelterfacelD is the number of the private network interface;
PrivatelPAddress为私有网络中的 IP地址;  PrivatelPAddress is the IP address in the private network;
PrivatePort为私有网络中的端口号;  PrivatePort is the port number in the private network;
PublicIterfacelD为公有网络接口的编号;  PublicIterfacelD is the number of the public network interface;
PublicIPAddress为公有网络中的 IP地址;  PublicIPAddress is the IP address in the public network;
PublicPort为公有网络中的端口号;  PublicPort is the port number in the public network;
DestinationlPAddress为公有网络中 IP报文的目的地址;  DestinationlPAddress is the destination address of the IP packet in the public network.
DestinationPort为公有网絡中 IP报文的目的端口。  DestinationPort is the destination port of IP packets in the public network.
参数 nmt还可以被定义成字符串列表的格式, 实现一次增加多个 NAT地址 映射。 具体实现中, 参数 nmt还可以进一步定义公网地址携带项, 将与所述私 网地址进行 NAT映射的公网地址发送给媒体网关, 以实现媒体网关控制器强制 控制 NAT映射项的目的。  The parameter nmt can also be defined as a string list format, which implements multiple NAT address mappings at a time. In a specific implementation, the parameter nmt may further define a public network address carrying item, and send a public network address that is mapped to the private network address to the media gateway, so as to implement the purpose of the media gateway controller forcibly controlling the NAT mapping item.
具体实现中, 所述第一发送单元 11 向媒体网关发送的指示信息还可包括 NAT删除指示信息, NAT类型指示信息、 NAT保活时长指示信息中至少一种。 NAT类型指示信息和 NAT保活时长指示信息可以和需建立 NAT地址映射的指 示信息或 NAT删除指示信息同时下发,也可以单独下发。所述 NAT类型指示用 于指示 NAT映射地址的类型, 可通过扩展 H.248协议的一个属性用于指示 NAT 类型, 该属性可以是上下文属性或者终端属性。 以终端属性为例, 新增属性 nattype, 取值为枚举型, 可选值包括以上四种 NAT地址类型以及非 NAT类型。 所述 NAT保活时长指示用于指示所述 NAT的保活时长,可通过扩展 H.248协议 的一个属性用于指示 NAT保活时长, 该属性可以是上下文属性或者终端属性。 以终端属性为例, 新增属性 kad, 数据类型可为整数, 单位可为毫秒。 所述 NAT 删除指示信息用于指示媒体网关删除 NAT地址映射, 可通过扩展 H.248协议的 一个属性用于 NAT删除指示, 该属性可以是上下文属性或者终端属性。 以终端 属性为例, 新增属性 natds, 比如, 当某个 NAT地址映射不再被使用, 媒体网关 控制器可以指示媒体网关主动删除。 例如当媒体网关从信令消息中获知呼叫结 束时, 则可以主动删除该呼叫相关的 NAT地址映射。 natds还可以被定义成字符 串列表的格式, 实现一次删除多个 NAT地址映射。 在步驟 S302,媒体网关接收到媒体网关控制器发送的需建立 NAT地址映射 中, 媒体网关将 NAT地址映射的结杲在应答消息中返回给媒体网关控制器。 当 媒体网关控制器下发给媒体网关的需建立 NAT地址映射指示信息中未包括公网 地址时, 该应答消息中可携带 NAT地址映射后的公网地址。 媒体网关控制器获 得了 NAT地址映射后的公有网絡地址后, 可以用该地址替换原有信令协议消息 中的 NAT地址映射前的私有网絡地址,从而实现了 NAT的穿越, 简化了信令流 程。 In a specific implementation, the indication information that is sent by the first sending unit 11 to the media gateway may further include at least one of NAT deletion indication information, NAT type indication information, and NAT keep-alive duration indication information. The NAT type indication information and the NAT keep-alive duration indication information may be delivered simultaneously with the indication information or the NAT deletion indication information that needs to be set up for the NAT address mapping, or may be delivered separately. The NAT type indicates a type used to indicate a NAT mapping address, and an attribute of the extended H.248 protocol is used to indicate a NAT type, and the attribute may be a context attribute or a terminal attribute. Take the terminal attribute as an example. The new attribute nattype is added to the enumeration type. The optional values include the above four NAT address types and non-NAT types. The NAT keepalive duration indication is used to indicate the keepalive duration of the NAT, and an attribute of the extended H.248 protocol is used to indicate a NAT keepalive duration, and the attribute may be a context attribute or a terminal attribute. Take the terminal attribute as an example, add the attribute kad, the data type can be an integer, and the unit can be milliseconds. The NAT deletion indication information is used to indicate that the media gateway deletes the NAT address mapping, and may be used as a NAT deletion indication by extending an attribute of the H.248 protocol, and the attribute may be a context attribute or a terminal attribute. Taking the terminal attribute as an example, the attribute natds is added. For example, when a NAT address mapping is no longer used, the media gateway controller can instruct the media gateway to delete it actively. For example, when the media gateway learns from the signaling message that the call ends, the call-related NAT address mapping may be actively deleted. Natds can also be defined as a string list format, enabling multiple NAT address mappings to be deleted at one time. In step S302, the media gateway receives the mapping of the NAT address that is sent by the media gateway controller, and the media gateway returns the mapping of the NAT address to the media gateway controller in the response message. When the media gateway controller sends the NAT address mapping indication information to the media gateway that does not include the public network address, the response message may carry the public network address mapped by the NAT address. After obtaining the public network address mapped by the NAT address, the media gateway controller can replace the private network address before the mapping of the NAT address in the original signaling protocol message, thereby implementing NAT traversal and simplifying the signaling process. .
对于已经建立的 NAT地址映射, 媒体网关控制器可以主动删除, 一种可能 的情况是:呼叫结束, 用于该呼叫的 NAT地址映射不再使用。 媒体网关也可以主 动上报删除已有的 NAT地址映射,例如某个 NAT地址映射因为保活定时器超时 而主动上报删除。  For the established NAT address mapping, the media gateway controller can actively delete. One possibility is that the call ends and the NAT address mapping for the call is no longer used. The media gateway can also report the deletion of the existing NAT address mapping. For example, a NAT address mapping is automatically reported and deleted because the keepalive timer expires.
图 3是本发明实现 NAT的***的第二实施例结构组成示意图;如图 3所示, 本实施例的实现 NAT的***包括媒体网关 6和媒体网关控制器 7; 所述媒体网 关 6用于接收从私有网络发送至公有网络的媒体流, 并根据所述媒体流中携带  3 is a schematic structural diagram of a second embodiment of a system for implementing NAT according to the present invention; as shown in FIG. 3, the system for implementing NAT in this embodiment includes a media gateway 6 and a media gateway controller 7; Receiving a media stream sent from the private network to the public network, and carrying according to the media stream
体网关控制器。 所述媒体网关控制器 7用于接收所述媒体网关 6发送的 NAT新 增信息以及 NAT删除信息中至少一种。 Body gateway controller. The media gateway controller 7 is configured to receive at least one of NAT enhancement information and NAT deletion information sent by the media gateway 6.
进一步, 仍参考图 3, 所述媒体网关 6包括第一接收单元 60、 创建单元 61、 删除单元 62 (可选) 以及发送单元 63 (可选), 其中,  Further, still referring to FIG. 3, the media gateway 6 includes a first receiving unit 60, a creating unit 61, a deleting unit 62 (optional), and a sending unit 63 (optional), where
所述第一接收单元 60 , 用于接收从私有网络发送至公有网络的媒体流; 所述创建单元 61 , 用于所述媒体流中的私有网络地址建立 NAT地址映射; 如前所述, 所述建立的 NAT地址映射可以映射表的形式存在。 当 NAT类型为 Full Cone (全锥)、 Restricted Cone (限制锥 ) 以及 Port Restricted Cone (端口限 制锥) 中任一个时, 所述 NAT地址映射参数以及所述创建单元 61建立的 NAT 地址映射表项举例如下:  The first receiving unit 60 is configured to receive a media stream that is sent from the private network to the public network, where the creating unit 61 is configured to establish a NAT address mapping for the private network address in the media stream; The established NAT address mapping can exist in the form of a mapping table. When the NAT type is any one of a Full Cone, a Restricted Cone, and a Port Restricted Cone, the NAT address mapping parameter and the NAT address mapping entry established by the creating unit 61 Examples are as follows:
表项格式:  Entry format:
PrivateIterfaceID'1' rivateIPAddress'1' rivatePort''l',PublicIterfaceID',r,PublicI PAddress"!" PublicPort。 当 NAT类型为 Symmetric时, 所述 NAT地址映射参数以及所述媒体网关 2 建立的 NAT地址映射表项举例如下: PrivateIterfaceID'1'rivateIPAddress'1'rivatePort''l' , PublicIterfaceID' , r , PublicI PAddress"!" PublicPort. When the NAT type is the Symmetric, the NAT address mapping parameter and the NAT address mapping table established by the media gateway 2 are as follows:
表项格式:  Entry format:
PrivateIterfaceID'1' rivateIPAddress"r'PrivatePort',l',PublicIterfaceID''r'PublicI PAddress'l" PublicPort"l"DestinationIPAddress"l" DestinationPort。 PrivateIterfaceID'1'rivateIPAddress"r'PrivatePort' , l' , PublicIterfaceID''r'PublicI PAddress'l"PublicPort"l"DestinationIPAddress"l" DestinationPort.
所述删除单元 62, 用于删除所述媒体网关 6上的 NAT地址映射, 具体实现 中, 删除单元 62包括判断单元和删除子单元, 所述判断单元用于判断媒体网上 存储的 NAT地址映射是否超过保活时长限定的时间; 所述删除子单元, 用于在 所述判断单元的判断结果为是时, 删除超过保活时长的 NAT地址映射;  The deleting unit 62 is configured to delete the NAT address mapping on the media gateway 6. In the specific implementation, the deleting unit 62 includes a determining unit and a deleting subunit, and the determining unit is configured to determine whether the NAT address mapping stored on the media network is Determining the time limit of the keep-alive duration; the deleting sub-unit, configured to delete the NAT address mapping that exceeds the keep-alive duration when the judgment result of the determining unit is YES;
所述发送单元 63 ,用于向所述媒体网关控制器 7上报所述建立的 NAT地址 映射和所述删除的 NAT地址映射中至少一种。 扩展 H.248事件 natar上4艮新增 NAT地址映射。 该事件携带参数 mpr. 数据类型为字符串。  The sending unit 63 is configured to report, to the media gateway controller 7, at least one of the established NAT address mapping and the deleted NAT address mapping. Extended H.248 event 4 NAT address mapping on natar. This event carries the parameter mpr. The data type is a string.
当 NAT类型为 Full Cone(全锥)、 Restricted Cone(限制锥)以及?011 Restricted Cone (端口限制锥) 中任一个时, 参数 mpr的格式如下:  When the NAT type is Full Cone, Restricted Cone, and? In any of the 011 Restricted Cones, the format of the parameter mpr is as follows:
PrivateIterfaceID'1' rivateIPAddress'1'TrivatePort''r'PublicIterfaceID''l''PublicI PrivateIterfaceID'1' rivateIPAddress'1'TrivatePort''r'PublicIterfaceID''l''PublicI
PAddress'l" PublicPort PAddress'l" PublicPort
其中, Privatelterf acelD为私有网络接口的编号  Where Privatelterf acelD is the number of the private network interface
PrivatelPAddress为私有网络中的 IP地址 PrivatelPAddress is the IP address in the private network.
PrivatePort为私有网络中的端口号  PrivatePort is the port number in the private network.
PublicIterfacelD为公有网络接口的编号  PublicIterfacelD is the number of the public network interface
PublicIPAddress为公有网络中的 IP地址  PublicIPAddress is the IP address in the public network
PublicPort为公有网络中的端口号。  PublicPort is the port number in the public network.
当 NAT类型为 Symmetric时, 参数 mpr的格式如下:  When the NAT type is Symmetric, the format of the parameter mpr is as follows:
PrivateIterfaceID'1' rivateIPAddress'1"PrivatePort',l',PublicIterfaceID"r'PublicI PAddress'l" PublicPort"l"DestinationIPAddress"l" DestinationPort PrivateIterfaceID'1'rivateIPAddress'1"PrivatePort' , l' , PublicIterfaceID"r'PublicI PAddress'l"PublicPort"l"DestinationIPAddress"l" DestinationPort
PrivatelterfacelD为私有网絡接口的编号  PrivatelterfacelD is the number of the private network interface
PrivatelPAddress为私有网络中的 IP地址  PrivatelPAddress is the IP address in the private network.
PrivatePort为私有网络中的端口号  PrivatePort is the port number in the private network.
PublicIterfacelD为公有网络接口的编号  PublicIterfacelD is the number of the public network interface
PublicIPAddress为公有网络中的 IP地址 PublicPort为公有网络中的端口号 PublicIPAddress is the IP address in the public network. PublicPort is the port number in the public network
DestinationlPAddress为公有网络中 IP 4艮文的目的地址  DestinationlPAddress is the destination address of the IP address in the public network.
DestinationPort为公有网络中 IP才艮文的目的端口。  The DestinationPort is the destination port of the IP address in the public network.
参数 mpr的数据类型也可以定义成字符串列表类型, 用来一个事件上报多 个新增的 NAT地址映射。  The data type of the parameter mpr can also be defined as a string list type, which is used to report multiple new NAT address mappings for an event.
扩展 H.248事件 natdr上报被删除的 NAT地址映射。 该事件携带参数 mpd, 数据类型为字符串。 该参数描述被删除的 NAT地址映射。 该参数也可定义成字 符串列表类型, 用来一次事件上报多个被删除的 NAT地址映射。  Extended H.248 Event natdr reports the deleted NAT address mapping. This event carries the parameter mpd and the data type is a string. This parameter describes the deleted NAT address mapping. This parameter can also be defined as a string list type, which is used to report multiple deleted NAT address mappings in one event.
进一步, 仍参考图 3 , 媒体网关控制器 7包括: 第二接收单元 70和存储单 元 71 (可选), 其中,  Further, still referring to FIG. 3, the media gateway controller 7 includes: a second receiving unit 70 and a storage unit 71 (optional), where
所述第二接收单元 70 用于接收媒体网关发送的所述媒体网关建立的 NAT 地址映射和 /或所述媒体网关删除的 NAT地址映射。  The second receiving unit 70 is configured to receive a NAT address mapping established by the media gateway and/or a NAT address mapping deleted by the media gateway sent by the media gateway.
所述存储单元 71 , 用于存储 NAT地址映射。  The storage unit 71 is configured to store a NAT address mapping.
图 4是本发明实施例实现 NAT的方法的第二实施例流程示意图。 如图 4所 示, 本实施例的实现 NAT的方法,  FIG. 4 is a schematic flowchart diagram of a second embodiment of a method for implementing NAT according to an embodiment of the present invention. As shown in FIG. 4, the method for implementing NAT in this embodiment,
在步骤 S400 , 媒体网关接收到从私有网络发送至公有网络的媒体流; 在步骤 S401 ,媒体网关为所述媒体流中的私有网络地址建立 NAT地址映射; 在步骤 S402,媒体网关向媒体网关控制器上报创建的 NAT地址映射。 扩展 In step S400, the media gateway receives the media stream sent from the private network to the public network; in step S401, the media gateway establishes a NAT address mapping for the private network address in the media stream; in step S402, the media gateway controls the media gateway. The NAT address mapping created by the device is reported. Expansion
H.248事件 natar上报新增 NAT地址映射。 该事件携带参数 mpr. 数据类型为字 符串。 H.248 event natar reports a new NAT address mapping. This event carries the parameter mpr. The data type is a string.
当 NAT类型为 Full Cone(全锥 ). Restricted Cone(限制锥)以及 011 Restricted When the NAT type is Full Cone (restricted cone) and 011 Restricted
Cone (端口限制锥) 中任一个时, 参数 mpr的格式如下: In any of the Cone (port limit cones), the format of the parameter mpr is as follows:
PrivateIterfaceID'1' rivateIPAddress'1' rivatePort''r'PublicIterfaceID''l''PublicI PrivateIterfaceID'1' rivateIPAddress'1' rivatePort''r'PublicIterfaceID''l''PublicI
PAddress'l" PublicPort。 PAddress'l" PublicPort.
其中, Privatelterf acelD为私有网络接口的编号;  Where Privatelterf acelD is the number of the private network interface;
PrivatelPAddress为私有网络中的 IP地址; PrivatelPAddress is the IP address in the private network;
PrivatePort为私有网络中的端口号;  PrivatePort is the port number in the private network;
PublicIterfacelD为公有网络接口的编号;  PublicIterfacelD is the number of the public network interface;
PublicIPAddress为公有网络中的 IP地址;  PublicIPAddress is the IP address in the public network;
PublicPort为公有网络中的端口号。 当 NAT类型为 Symmetric时, 参数 mpr的格式如下: PublicPort is the port number in the public network. When the NAT type is Symmetric, the format of the parameter mpr is as follows:
PrivateIterfaceID'1'TrivateIPAddress"r'PrivatePort''l''PublicIterfaceID''r'PublicI PAddress"!" PublicPort"l"DestinationIPAddress"l" DestinationPort。 其中:  PrivateIterfaceID '1'TrivateIPAddress"r'PrivatePort''l''PublicIterfaceID''r'PublicI PAddress"!" PublicPort"l"DestinationIPAddress"l" DestinationPort.
PrivatelterfacelD为私有网络接口的编号;  PrivatelterfacelD is the number of the private network interface;
PrivatelPAddress为私有网络中的 IP地址;  PrivatelPAddress is the IP address in the private network;
PrivatePort为私有网络中的端口号;  PrivatePort is the port number in the private network;
PublicIterfacelD为公有网络接口的编号;  PublicIterfacelD is the number of the public network interface;
PublicIPAddress为公有网络中的 IP地址;  PublicIPAddress is the IP address in the public network;
PublicPort为公有网络中的端口号;  PublicPort is the port number in the public network;
DestinationlPAddress为公有网络中 IP报文的目的地址;  DestinationlPAddress is the destination address of the IP packet in the public network.
DestinationPort为公有网络中 IP报文的目的端口。  DestinationPort is the destination port of IP packets in the public network.
参数 mpr的数据类型也可以定义成字符串列表类型, 用来一个事件上报多 个新增的 NAT地址映射。  The data type of the parameter mpr can also be defined as a string list type, which is used to report multiple new NAT address mappings for an event.
在步骤 S403,媒体网关判断所述建立的 NAT地址映射项是否超过保活时长 所限定的时间, 如果判断为是, 执行步骤 S404; 如果判断为否, 保留所述 NAT; 在步骤 S404, 媒体网关向媒体网关控制器上报 NAT删除信息, 所述 NAT 删除信息用于指示媒体网关控制器删除所述媒体网关删除的 NAT地址映射。 扩 展 H.248事件 natdr上报被删除的 NAT地址映射。 该事件携带参数 mpd, 数据 类型为字符串。 该参数描述被删除的 NAT地址映射。 该参数也可定义成字符串 列表类型, 用来一次事件上报多个被删除的 NAT地址映射。  In step S403, the media gateway determines whether the established NAT address mapping entry exceeds the time defined by the keep-alive duration. If the determination is yes, step S404 is performed; if the determination is no, the NAT is retained; in step S404, the media gateway is performed. The NAT deletion information is reported to the media gateway controller, where the NAT deletion information is used to instruct the media gateway controller to delete the NAT address mapping deleted by the media gateway. Extending the H.248 event natdr reports the deleted NAT address mapping. This event carries the parameter mpd and the data type is a string. This parameter describes the deleted NAT address mapping. This parameter can also be defined as a string list type, which is used to report multiple deleted NAT address mappings in one event.
步骤 S403和步骤 S404为可选步骤, 在一些情况下不需要被执行。 例如, 媒体网关控制器可能主动删除 NAT地址映射,而不需要媒体网关自发判断删除。  Steps S403 and S404 are optional steps, and in some cases need not be performed. For example, the media gateway controller may actively delete the NAT address mapping without requiring the media gateway to spontaneously determine the deletion.
本发明实施例媒体网关接收到媒体网关控制器发送的 NAT地址映射指示信 息或接收到从私有网络发送至公有网络的媒体流时, 建立私有网络地址与公有 网络地址间的 NAT地址映射, 从而在媒体网关上实现了 NAT, 使得媒体网关能 在公有网络和私有网络之间进行 IP报文的路由转发。  In the embodiment of the present invention, when receiving the NAT address mapping indication information sent by the media gateway controller or receiving the media stream sent from the private network to the public network, the media gateway establishes a NAT address mapping between the private network address and the public network address, thereby NAT is implemented on the media gateway, so that the media gateway can forward and forward IP packets between the public network and the private network.
以上两个实施例可以同时并存。 这两个实施例的差别主要在于 NAT地址映 射的产生方法。 NAT地址映射产生后, NAT地址映射可以被媒体网关控制器主 动删除, 也可以由媒体网关上报删除。 媒体网关控制器在以上两个实施例的情 况下, 都可以向媒体网关设置 NAT类型和 /或保活时长。 这种设置可以是媒体网 关级别的, 或者接口级别的, 或者是 NAT地址映射级别的。 The above two embodiments can coexist at the same time. The difference between these two embodiments lies mainly in the method of generating NAT address mapping. After the NAT address mapping is generated, the NAT address mapping can be deleted by the media gateway controller or deleted by the media gateway. In the case of the above two embodiments, the media gateway controller can set the NAT type and/or keep-alive duration to the media gateway. This setting can be a media network Off level, or interface level, or NAT address mapping level.
通过以上的实施方式的描述, 所属领域的技术人员可以清楚地了解到本发 明可借助软件加必需的通用硬件平台的方式来实现, 当然也可以通过硬件, 但 很多情况下前者是更佳的实施方式。 基于这样的理解, 本发明的技术方案本质 上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来, 该计算 机软件产品存储在可读取的存储介质中, 如计算机的软盘, 硬盘或光盘等, 包 括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网絡 设备等)执行本发明各个实施例所述的方法。  Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is a better implementation. the way. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer. A hard disk or optical disk or the like includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
以上所列举的仅为本发明较佳实施例而已, 当然不能以此来限定本发明之 权利范围, 因此依本发明权利要求所作的等同变化, 仍属本发明所涵盖范围。  The above are only the preferred embodiments of the present invention, and the scope of the present invention is not limited thereto, and the equivalent changes made by the claims of the present invention are still within the scope of the present invention.

Claims

权 利 要 求 Rights request
1、 一种实现 NAT的方法, 其特征在于, 包括: A method for implementing NAT, comprising:
媒体网关接收到媒体网关控制器发送的需建立 NAT地址映射的指示信息或 接收到从私有网络发送至公有网络的媒体流时, 建立私有网络地址与公有网絡 地址间的 NAT地址映射。  The media gateway establishes a NAT address mapping between the private network address and the public network address when receiving the indication information to be established by the media gateway controller to establish a NAT address mapping or receiving the media stream sent from the private network to the public network.
2、 如权利要求 1所述的实现 NAT的方法, 其特征在于, 所述媒体网关接 收到媒体网关控制器发送的需建立 NAT地址映射的指示信息之前, 还包括: 媒体网关控制器获取私有网络地址; The method for implementing the NAT according to claim 1, wherein before the media gateway receives the indication information that needs to be established by the media gateway controller to establish a NAT address mapping, the method further includes: the media gateway controller acquiring the private network Address
媒体网关控制器向媒体网关发送需建立 NAT地址映射的指示信息, 所述指 示信息包括所述获取的私有网络地址。  The media gateway controller sends, to the media gateway, indication information that needs to establish a NAT address mapping, where the indication information includes the acquired private network address.
3、 如权利要求 2所述的实现 NAT的方法, 其特征在于, 所述指示信息进 一步包括私有网络侧的网络接口的标识, 公有网络地址以及公有网络侧的网络 接口的标识中至少一种。 The method for implementing the NAT according to claim 2, wherein the indication information further comprises at least one of an identifier of a network interface on the private network side, a public network address, and an identifier of a network interface on the public network side.
4、 如权利要求 2所述的实现 NAT的方法, 其特征在于, 所述建立私有网 络地址与共有网络地址间的 NAT地址映射之后, 还包括: The method for implementing the NAT according to claim 2, wherein after the mapping between the private network address and the shared network address is established, the method further includes:
媒体网关通过 NAT应答信息,向媒体网关控制器发送建立所述 NAT地址映 射后, 所述私网地址对应的公有网络地址。  The media gateway sends the public network address corresponding to the private network address after the NAT address mapping is established by using the NAT response information to the media gateway controller.
5、 如权利要求 1所述的实现 NAT的方法, 其特征在于, 还包括: 媒体网关接收到媒体网关控制器发送的 NAT删除指示信息,根据所述 NAT 删除指示信息删除 NAT地址映射。 The method for implementing the NAT according to claim 1, further comprising: the media gateway receiving the NAT deletion indication information sent by the media gateway controller, and deleting the NAT address mapping according to the NAT deletion indication information.
6、 如权利要求 1 -4中任一项所述的实现 NAT的方法, 其特征在于, 所述媒体网关接收到媒体网关控制器发送的 NAT类型指示信息、 NAT保活 时长指示信息中至少一种, 所述 NAT类型指示信息用于指示所述媒体网关建立 NAT地址映射的相应类型, 所述保活时长用于指示所述媒体网关建立的 NAT地 址映射的保持时间。 The method for implementing the NAT according to any one of claims 1 to 4, wherein the media gateway receives at least one of NAT type indication information and NAT keep-alive duration indication information sent by the media gateway controller. The NAT type indication information is used to indicate that the media gateway is established. A corresponding type of the NAT address mapping, where the keep-alive duration is used to indicate a hold time of the NAT address mapping established by the media gateway.
7、 如权利要求 1所述的实现 NAT的方法, 其特征在于, 媒体网关接收到 从私有网络发送至公有网络的媒体流, 建立私有网络地址与公有网络地址间的 NAT地址映射之后, 还包括: The method for implementing the NAT according to claim 1, wherein the media gateway receives the media stream sent from the private network to the public network, and after establishing the NAT address mapping between the private network address and the public network address, :
媒体网关将所述媒体网关建立的 NAT地址映射发送给媒体网关控制器。  The media gateway sends the NAT address mapping established by the media gateway to the media gateway controller.
8、 如权利要求 1所述的实现 NAT的方法, 其特征在于, 还包括: 媒体网关向媒体网关控制器上报 NAT 删除信息, 将所述媒体网关删除的 NAT地址映射发送给媒体网关控制器。 The method for implementing the NAT according to claim 1, further comprising: the media gateway reporting the NAT deletion information to the media gateway controller, and transmitting the NAT address mapping deleted by the media gateway to the media gateway controller.
9、 如权利要求 8所述的实现 NAT的方法, 其特征在于, 所述媒体网关向 媒体网关控制器上报 NAT删除信息,将所述媒体网关删除的 NAT地址映射发送 给媒体网关控制器包括: 断为是, 媒体网关删除所述 NAT, 并向媒体网关控制器上报 NAT删除信息, 指 示所述媒体网关控制器删除所述媒体网关删除的 NAT地址映射。 The method for implementing the NAT according to claim 8, wherein the media gateway reports the NAT deletion information to the media gateway controller, and the mapping of the NAT address deleted by the media gateway to the media gateway controller includes: The media gateway deletes the NAT and reports the NAT deletion information to the media gateway controller, instructing the media gateway controller to delete the NAT address mapping deleted by the media gateway.
10、 一种媒体网关, 其特征在于, 包括: 10. A media gateway, comprising:
第一接收单元, 用于接收从私有网络发送至公有网络的媒体流;  a first receiving unit, configured to receive a media stream that is sent from a private network to a public network;
或第二接收单元, 用于接收媒体网关控制器发送的需建立 NAT地址映射的 指示信息;  Or the second receiving unit is configured to receive, by the media gateway controller, indication information that needs to establish a NAT address mapping;
还包括:  Also includes:
创建单元, 用于根据所述第二接收单元接收的 NAT地址映射的指示信息或 所述第一接收单元接收的所述从私有网络发送至公有网络的媒体流, 建立私有 网络地址与公有网络地址间的 NAT地址映射。  a creating unit, configured to establish a private network address and a public network address according to the indication information of the NAT address mapping received by the second receiving unit or the media stream sent by the first receiving unit to the public network from the private network NAT address mapping between.
11、 如权利要求 10所述的媒体网关, 其特征在于, 所述第一接收单元或所 述第二接收单元还用于接收媒体网关控制器发送的 NAT类型指示信息、 NAT保 活时长指示信息以及 NAT删除指示信息中至少一种,所述 NAT类型指示信息用 于指示所述媒体网关建立的 NAT地址映射的相应类型, 所述保活时长用于指示 所述媒体网关建立的 NAT地址映射的保持时间, 所述删除指示信息用于指示所 述媒体网关删除 NAT地址映射。 The media gateway according to claim 10, wherein the first receiving unit or the second receiving unit is further configured to receive the NAT type indication information sent by the media gateway controller, and the NAT protection And at least one of the live time indication information and the NAT deletion indication information, where the NAT type indication information is used to indicate a corresponding type of the NAT address mapping established by the media gateway, where the keep-alive duration is used to indicate that the media gateway is established. The hold time of the NAT address mapping, where the deletion indication information is used to instruct the media gateway to delete the NAT address mapping.
12、 如权利要求 10或 11所述的媒体网关, 其特征在于, 还包括: 删除单元, 用于主动删除所述 NAT地址映射或根据所述媒体网关控制器发 送的 NAT删除指示信息删除所述 NAT地址映射。 The media gateway according to claim 10 or 11, further comprising: a deleting unit, configured to delete the NAT address mapping or delete the NAT deletion indication information sent by the media gateway controller NAT address mapping.
13、 如权利要求 12所述的媒体网关, 其特征在于, 还包括: The media gateway of claim 12, further comprising:
发送单元,用于向媒体网关控制器发送建立的 NAT地址映射和 /或所述删除 单元删除的 NAT地址映射。  And a sending unit, configured to send the established NAT address mapping and/or the NAT address mapping deleted by the deleting unit to the media gateway controller.
14、 如权利要求 12所述的媒体网关, 其特征在于, 所述删除单元包括: 的时间; The media gateway according to claim 12, wherein the deleting unit comprises: a time;
删除子单元, 用于在所述判断单元的判断结果为是时, 删除超过保活时长 的 NAT地址映射。  The delete subunit is configured to delete the NAT address mapping that exceeds the keepalive duration when the judgment result of the judging unit is YES.
15、 一种媒体网关控制器, 其特征在于, 包括: 15. A media gateway controller, comprising:
第一发送单元, 用于向媒体网关发送需建立 NAT地址映射的指示信息。  The first sending unit is configured to send, to the media gateway, indication information that needs to establish a NAT address mapping.
16、 如权利要求 15所述的媒体网关控制器, 其特征在于, 还包括: 获取单元, 用于获取私有网络地址, 所述私有网络地址由第一发送单元携 带在需建立 NAT地址映射的指示信息中发送给媒体网关。 The media gateway controller according to claim 15, further comprising: an obtaining unit, configured to acquire a private network address, where the private network address is carried by the first sending unit, and an indication that a NAT address mapping needs to be established The information is sent to the media gateway.
17、 如权利要求 15或 16所述的媒体网关控制器, 其特征在于, 所述第一 发送单元还用于向所述媒体网关发送 NAT类型指示信息、 NAT保活时长指示信 息以及 NAT删除指示信息中至少一种。 The media gateway controller according to claim 15 or 16, wherein the first sending unit is further configured to send the NAT type indication information, the NAT keep-alive duration indication information, and the NAT deletion indication to the media gateway. At least one of the information.
18、 如权利要求 15或 16所述的媒体网关控制器, 其特征在于, 还包括: 第一接收单元, 用于接收媒体网关发送的 NAT地址映射创建应答。 The media gateway controller according to claim 15 or 16, further comprising: a first receiving unit, configured to receive a NAT address mapping creation response sent by the media gateway.
19、 如权利要求 15或 16所述的媒体网关控制器, 其特征在于, 还包括: 第二接收单元, 用于接收媒体网关发送的所述媒体网关建立的 NAT地址映 射和 /或所述媒体网关删除的 NAT地址映射。 The media gateway controller according to claim 15 or 16, further comprising: a second receiving unit, configured to receive a NAT address mapping and/or the media established by the media gateway sent by the media gateway Gateway deleted NAT address mapping.
20、 权利要求 15或 16所述的媒体网关控制器, 其特征在于, 还包括: 存储单元, 用于存储 NAT地址映射。 The media gateway controller of claim 15 or 16, further comprising: a storage unit, configured to store a NAT address mapping.
PCT/CN2009/070890 2008-03-31 2009-03-19 A method and an apparatus for realizing nat WO2009121267A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNA2008100271351A CN101552745A (en) 2008-03-31 2008-03-31 Method and device for realizing NAT
CN200810027135.1 2008-03-31

Publications (1)

Publication Number Publication Date
WO2009121267A1 true WO2009121267A1 (en) 2009-10-08

Family

ID=41134829

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/070890 WO2009121267A1 (en) 2008-03-31 2009-03-19 A method and an apparatus for realizing nat

Country Status (2)

Country Link
CN (1) CN101552745A (en)
WO (1) WO2009121267A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113949695A (en) * 2020-06-29 2022-01-18 中兴通讯股份有限公司 Method for accessing network, media gateway, electronic equipment and storage medium

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552803B (en) * 2008-04-03 2011-10-05 华为技术有限公司 Method for maintaining network address translation address mapping table, media gateway and controller thereof
WO2014139094A1 (en) * 2013-03-12 2014-09-18 华为技术有限公司 Communication method, device and system
CN104168338A (en) * 2013-05-16 2014-11-26 杭州迪普科技有限公司 Network address conversion device and network address conversion method
EP3094066B1 (en) * 2014-01-14 2020-10-07 Huawei Technologies Co., Ltd. Network address translation method and apparatus
CN107241453B (en) * 2016-03-28 2020-07-24 华为技术有限公司 Network address translation mapping keep-alive method and device
CN106878259B (en) * 2016-12-14 2020-12-11 新华三技术有限公司 Message forwarding method and device
CN114024899A (en) * 2020-07-17 2022-02-08 艾锐势企业有限责任公司 Router, method for router, computer readable medium and device
CN113242325B (en) * 2021-04-08 2022-01-21 华南理工大学 UDP (user Datagram protocol) traversal method of incremental symmetric NAT (network Address translation)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030227905A1 (en) * 2002-06-10 2003-12-11 George Bouleros Access nodes in packet-based communications networks
CN1474566A (en) * 2002-08-09 2004-02-11 华为技术有限公司 Method for readlizing voice communication between medium gates based on medium gate control protocol
US20050076108A1 (en) * 2003-10-01 2005-04-07 Santera Systems, Inc. Methods and systems for per-session network address translation (NAT) learning and firewall filtering in media gateway

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030227905A1 (en) * 2002-06-10 2003-12-11 George Bouleros Access nodes in packet-based communications networks
CN1474566A (en) * 2002-08-09 2004-02-11 华为技术有限公司 Method for readlizing voice communication between medium gates based on medium gate control protocol
US20050076108A1 (en) * 2003-10-01 2005-04-07 Santera Systems, Inc. Methods and systems for per-session network address translation (NAT) learning and firewall filtering in media gateway

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113949695A (en) * 2020-06-29 2022-01-18 中兴通讯股份有限公司 Method for accessing network, media gateway, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN101552745A (en) 2009-10-07

Similar Documents

Publication Publication Date Title
WO2009121267A1 (en) A method and an apparatus for realizing nat
US8340089B2 (en) Apparatus and method for managing data transfer in VoIP gateway
US7257837B2 (en) Firewall penetration system and method for real time media communications
US8130766B2 (en) System and method for implementing multimedia calls across a private network boundary
US20070217408A1 (en) Address Resolution Device, Address Resolution Method, And Communication System Including The Same
WO2009121305A1 (en) Network address translation address mapping table maintaining method, media gateway and its controller
JP4818428B2 (en) COMMUNICATION SYSTEM, TELEPHONE EXCHANGE DEVICE, AND CONTROL METHOD
WO2008043283A1 (en) A method, system and device for keeping session tables alive in a network address translation device
US20030233471A1 (en) Establishing a call in a packet-based communications network
WO2007036160A1 (en) An apparatus, system and method for realizing communication between the client and the server
WO2008092340A1 (en) A keep-alive method, system of address forwarding list item and an agent service device
WO2008138245A1 (en) A method for implementing the inter-working gateway application layer routing and the system and session border controller thereof
US20130117460A1 (en) Data management methods for use in a network system and network systems using the same
WO2003030463A1 (en) A method and system for realizing ip voice service at private network
JP5988407B1 (en) Communication path control device, communication path control system, communication path control method, and communication path control program
WO2006125383A1 (en) A method for traversing the network address conversion/firewall device
JP4940335B2 (en) Telephone exchange apparatus, telephone terminal, and control method used in telephone system
JP2005129980A (en) Network, private branch exchange, radio lan terminal, and multi-protocol communication terminal control method used therefor
US20100002701A1 (en) System and method for media communication through network address translation
US8374178B2 (en) Apparatus and method for supporting NAT traversal in voice over internet protocol system
WO2011015067A1 (en) Method and system for implementing traversal of media control stream message through network address translator
WO2006015525A1 (en) A method for point-to-point calling between two multimedia terminals in the private network
WO2010054561A1 (en) Agent method of media stream, voice exchanger and communication system
JP2008520133A (en) Method and apparatus for implementing signaling proxy
JP2005252809A (en) Premise system for ip phone and speech transfer method

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

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

Country of ref document: EP

Kind code of ref document: A1