CN101552745A - Method and device for realizing NAT - Google Patents

Method and device for realizing NAT Download PDF

Info

Publication number
CN101552745A
CN101552745A CNA2008100271351A CN200810027135A CN101552745A CN 101552745 A CN101552745 A CN 101552745A CN A2008100271351 A CNA2008100271351 A CN A2008100271351A CN 200810027135 A CN200810027135 A CN 200810027135A CN 101552745 A CN101552745 A CN 101552745A
Authority
CN
China
Prior art keywords
nat
media gateway
map addresses
indication information
gateway controller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2008100271351A
Other languages
Chinese (zh)
Inventor
祝宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNA2008100271351A priority Critical patent/CN101552745A/en
Priority to PCT/CN2009/070890 priority patent/WO2009121267A1/en
Publication of CN101552745A publication Critical patent/CN101552745A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • 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

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

The embodiment of the invention discloses a method for realizing NAT, comprising the following step: a media gateway establishes NAT address mapping relation between a private network address and a global network address when receiving NAT address mapping relation indicating information sent by a media gateway controller or media streams sent from a private network to a global network. The embodiment of the invention also correspondingly discloses the media gateway controller and the media gateway. The method can realize the NAT on the media gateway, thereby the media gateway can transmit IP messages sent from the global network to the private network in a routing way.

Description

A kind of method and device of realizing NAT
Technical field
The present invention relates to moving communicating field, relate in particular to method and the device of a kind of NAT of realization.
Background technology
Next generation network is based on the product that time-multiplexed public switched telephone network (PSTN) and packet network based on Internet Protocol/asynchronous transfer mode merge mutually, and it makes that the integrated service of information such as realizing voice, video and data on consolidated network has become may.
Next generation network mainly comprises media gateway and Media Gateway Controller.Media Gateway Controller (MediaGateway Controller, MGC) and media gateway (Media Gateway MG) is two key members of the packet network under professional and the bearing separation structure.Wherein, MGC mainly is responsible for service control function, and MG mainly is responsible for the media bearer function.The gateway separation architecture that MGC and MG form has been realized separating of professional control plane and media bearer plane, thus abundant shared network resource, simplified apparatus upgrading and professional expansion, reduction development and maintenance cost.
Communicate by MGCP between MGC and the MC, present widely used MGCP has MGCP (Media Gateway Control Protocol, MGCP) and H.248/MeGaCo (Gateway Control Protocol, gateway control protocol) two kinds of agreements.
Media gateway can be used as borde gateway in different IP network, is used for realizing the media stream delivery of different IP networks.When media gateway during as borde gateway, generally media gateway is used back-to-back mode, creates IP terminal separately in two IP network respectively, is used for setting up the Media Stream passage in these two IP network.At medium gateway internal these two IP terminals are placed in the same context, thereby set up complete media stream delivery passage, make Media Stream can pass this two IP network, in this manner, need revise source address and destination address during Media Stream process media gateway.Also having a kind of mode is the media gateway realization routing function, and Media Stream is not revised source address and destination address during by media gateway, relies on the route form in the media gateway, seeks the address of outgoing interface and next jumping by destination address.To have one in two IP network at least be the problem of private network but a kind of mode in back can't solve.
For realize that the IP message transmits between private network and global network, the normal method that adopts is network address translation (Network Address Translation, a NAT) technology.
But the prior art media gateway is not supported the NAT map addresses, makes media gateway carry out routing forwarding to the IP message that global network mails to private network.
Summary of the invention
Embodiment of the invention technical problem to be solved is, method and the device of a kind of NAT of realization is provided, and makes media gateway can carry out the routing forwarding of IP message between global network and private network.
In order to solve the problems of the technologies described above, on the one hand, the embodiment of the invention provides the method for a kind of NAT of realization, and this method comprises:
Media gateway receives need that Media Gateway Controller sends and sets up the indication information of NAT map addresses or receive when private network is sent to the Media Stream of global network, sets up the NAT map addresses between private network address and global network address.
Accordingly, embodiments of the invention provide a kind of media gateway, comprising:
Receiving element, the need that are used for the transmission of receiving media gateway controller are set up NAT map addresses indication information or are received the Media Stream that is sent to global network from private network;
Creating unit is used for according to described NAT map addresses indication information or describedly is sent to the Media Stream of global network from private network, sets up the NAT map addresses between private network address and global network address.
Accordingly, embodiments of the invention also provide a kind of Media Gateway Controller, and described Media Gateway Controller comprises:
Transmitting element is used for sending the indication information that need set up the NAT map addresses to media gateway.
In an embodiment of the present invention, media gateway receives the NAT map addresses indication information that Media Gateway Controller sends or receives when private network is sent to the Media Stream of global network, set up the NAT map addresses between private network address and global network address, thereby on media gateway, realized NAT, made media gateway to carry out routing forwarding the IP message that global network mails to private network.
Description of drawings
Fig. 1 is that first example structure of the present invention system of realizing NAT is formed schematic diagram;
Fig. 2 is the first embodiment schematic flow sheet of the present invention's method of realizing NAT;
Fig. 3 is that second example structure of the present invention system of realizing NAT is formed schematic diagram;
Fig. 4 is the second embodiment schematic flow sheet of the present invention's method of realizing NAT.
Embodiment
For making the embodiment of the invention clearer, at first need to introduce network address translation (Network AddressTranslation, NAT) technology.
NAT is a kind of being used for an address field, is mapped as another address field as private intranet (Intranet) address field, as the standard techniques of the Internet (Internet) address field.NAT is the standard of Internet, and being positioned at private network is that private network and global network are the boundary of global network.When the IP packet of sending when private network arrives NAT device, NAT is responsible for internal proprietary net IP address transition is become the legitimate ip address of global network, that is to say the legitimate ip address of internal proprietary net IP map addresses (mapping), form address translation address mapping record (NAT map addresses record) to global network; Network address translation address mapping table on the NAT device (NAT address mapping table) has gathered the NAT map addresses record on this NAT; Every NAT map addresses writes down the address translation address mapping item (NAT map addresses item) in the NAT address mapping table just; After the packet of sending as the outside arrived NAT device, NAT device became the private network address by the information in the NAT address mapping table of consulting the NAT preservation with the global network address transition, is forwarded to the internal interface sink again.If basic NAT (Basic NAT), what preserve in the NAT address mapping table is the mapping relations of the IP address of internal network and external network; (Network Address Port Translation, NAPT), what then preserve in the NAT address mapping table is the mapping relations that IP address that the IP address of internal network adds port and external network adds port if network address port conversion.Basic NAT and NAPT are referred to as traditional NAT (Traditional NAT).
NAT is divided into 4 types, i.e. Full Cone (full awl), Restricted Cone (restriction awl), PortRestricted Cone (port limit awl) and Symmetric (symmetry).Three types of fronts are referred to as ConeNAT (awl network address translation), and a common ground is arranged: so long as the bag that comes out from same implicit IP address and port, NAT converts it to same outside ip address and port.But Symmetric is a bit different, and be in particular in: have only from same implicit IP address and port and send, and mail to same outside purpose IP address and port, NAT just becomes same outside ip address and port with this implicit IP address with port translation.Send from same home address and port, but mail to another outside purpose IP destination address and port, then NAT will use different mappings, and this implicit IP address will be converted into different outside ip address and port with port.
Embodiments of the present invention is described in detail below with reference to accompanying drawing.
Fig. 1 is that first example structure of the present invention system of realizing NAT is formed schematic diagram; As shown in Figure 1, the system of the realization NAT of present embodiment comprises Media Gateway Controller 1 and media gateway 2; Described Media Gateway Controller 1 is used to control media gateway 2 and realizes nat feature; Described media gateway 2 is used for setting up the NAT map addresses between private network address and global network address when the need that receive described Media Gateway Controller 1 transmission are set up the indication information of NAT map addresses.Further, still reference is as Fig. 1, and described Media Gateway Controller 1 comprises acquiring unit 10, first transmitting element 11, memory cell 12 and first receiving element 13, wherein,
Described acquiring unit 10 is used to obtain private network address; Media Gateway Controller all is the private network address that the SDP (Session Description Protocol, Session Description Protocol) by signaling protocol message such as SIP obtains calling party usually, and the NAT map addresses need be carried out in this address on media gateway.
Described first transmitting element 11, be used for sending the indication information that to set up the NAT map addresses to media gateway, described indication information comprises the private network address that need carry out the NAT map addresses, described indication information can also comprise the sign of the network interface of the sign of network interface of private network side and global network side, further, described indication information can also comprise the public network address that carries out NAT mapping with described private net address, forces the purpose of control NAT mapping to realize Media Gateway Controller.Concrete, the sign of the network interface of the sign of the network interface of described private network side and global network side also can realize by configuration in advance, if having only a private network interface or have only a global network interface, and also transmission interface sign not then.The attribute of expanding a MGCP (H.248 or MGCP) is used to indicate and requires to create new NAT map addresses, and this attribute can be context property or terminal attribute.With the terminal attribute is example, newly-increased attribute nmt.Data type is a character string.When the NAT type be among Full Cone (full awl), RestrictedCone (restriction awl) and the Port Restricted Cone (port limit awl) any the time, the form of this nmt property value is when issuing:
PrivateIterfaceID”|”PrivateIPAddress”|”PrivatePort”|”PublicIterfaceID。Wherein,
PrivateIterfaceID is the numbering of private network interface;
PrivateIPAddress is the IP address in the private network;
PrivatePort is the port numbers in the private network;
PublicIterfaceID is the numbering of global network interface.
Media gateway is carried to Media Gateway Controller in response message after mapping out the global network address on the interface of appointment for this private network address.In response message, the form of attribute nmt is:
PublicIPAddress " | " PublicPort, this form has provided the global network address after the mapping.
When the NAT type is Symmetric, in sending to the message of media gateway, Media Gateway Controller needs to increase indication purpose global network address.The form of attribute nmt is:
PrivateIterfaceID”|”PrivateIPAddress”|”PrivatePort”|”PublicIterfaceID”|”PublicIPAddress”|”PublicPort”|”DestinationIPAddress”|”DestinationPort。Wherein:
PrivateIterfaceID is the numbering of private network interface;
PrivateIPAddress is the IP address in the private network;
PrivatePort is the port numbers in the private network;
PublicIterfaceID is the numbering of global network interface;
PublicIPAddress is the IP address in the global network;
PublicPort is the port numbers in the global network;
DestinationIPAddress is the destination address of IP message in the global network;
DestinationPort is the destination interface of IP message in the global network.
Parameter nmt can also be defined by the form of character string tabulation, realizes once increasing a plurality of NAT map addresses.
In the specific implementation, parameter nmt can also further define public network address and carry item, will send to media gateway with the public network address that described private net address carries out NAT mapping, forces the purpose of control NAT mapping to realize Media Gateway Controller.
In the specific implementation, the indication information that described first transmitting element 11 sends to media gateway also can comprise NAT deletion indication, and is at least a in NAT type indication information, the NAT keep-alive duration indication information.NAT type indication information and NAT keep-alive duration indication information can set up the indication information of NAT map addresses with need or NAT deletion indication issues simultaneously, also can issue separately.The indication of described NAT type is used to indicate the type of NAT mapping address, can an attribute of agreement be used to indicate the NAT type by expanding H.248, and this attribute can be context property or terminal attribute.With the terminal attribute is example, newly-increased attribute nattype, and value is an enumeration type, optional value comprises above four kinds of NAT address styles and non-NAT type.The keep-alive duration that the indication of described NAT keep-alive duration is used to indicate described NAT can an attribute of agreement be used to indicate NAT keep-alive duration by expanding H.248, and this attribute can be context property or terminal attribute.With the terminal attribute is example, newly-increased attribute kad, and data type can be integer, and unit can be millisecond.
Media gateway receives the NAT deletion indication information that Media Gateway Controller sends, delete described NAT map addresses according to described NAT deletion indication information, described NAT deletion indication is used for indicating media gateway deletion NAT map addresses, can be used for the newly-increased indication of NAT by expanding H.248 an attribute of agreement, this attribute can be context property or terminal attribute.With the terminal attribute is example, newly-increased attribute natds, and this attribute may be defined as string format, describes deleted NAT map addresses.When certain NAT map addresses no longer is used, Media Gateway Controller can be deleted described NAT map addresses by indicating media gateway.For example when media gateway is known end of calling from signaling message, then can initiatively delete the relevant NAT map addresses of this calling.Natds can also be defined by the form of character string tabulation, realizes once deleting a plurality of NAT map addresses.
Described memory cell 12 is used to store the NAT map addresses, and the form that NAT map addresses item can be aggregated into the NAT address mapping table is stored in the described memory cell 12.
Described first receiving element 13 is used to receive NAT map addresses that described media gateway 2 sends and creates and reply.In the specific implementation, in the specific implementation, media gateway returns to Media Gateway Controller with the result of NAT map addresses in response message.When the need that are handed down to media gateway when Media Gateway Controller are set up and are not comprised public network address in the NAT map addresses indication information, the public network address in this response message after the portability NAT map addresses.After Media Gateway Controller has obtained global network address after the NAT map addresses, can replace private network address before the NAT map addresses in original signaling protocol message with this address, thereby realize passing through of NAT, simplify signaling process.Described memory cell 12 is further stored the described NAT map addresses item that receives.
Accordingly, described media gateway 2 comprises second receiving element 20, creating unit 21, delete cells 22 and second transmitting element 23, wherein,
Described second receiving element 20 is used to receive the indication information that need that described Media Gateway Controller 1 sends are set up the NAT map addresses.Second receiving element 20 described in the specific implementation receives the various information that described first transmitting element 11 sends, and comprises, need set up indication information, NAT deletion indication information, the indication of NAT type and the NAT keep-alive duration etc. of NAT map addresses.
Described creating unit 21 is used for setting up according to the need of described reception the indication information of NAT map addresses, sets up the NAT map addresses between private network address and global network address, and as previously mentioned, the form that the NAT map addresses of described foundation can mapping table exists.When the NAT type be among Full Cone (full awl), RestrictedCone (restriction awl) and the Port Restricted Cone (port limit awl) any the time, the NAT map addresses list item of described NAT map addresses parameter and 2 foundation of described media gateway is exemplified below:
The list item form:
PrivateIterfaceID”|”PrivateIPAddress”|”PrivatePort”|”PublicIterfaceID”|”PublicIPAddress”|”PublicPort。
When the NAT type was Symmetric, the NAT map addresses list item that described NAT map addresses parameter and described media gateway 2 are set up was exemplified below:
The list item form:
PrivateIterfaceID”|”PrivateIPAddress”|”PrivatePort”|”PublicIterfaceID”|”PublicIPAddress”|”PublicPort”|”DestinationIPAddress”|”DestinationPort。
Described delete cells 22 is used to delete the NAT map addresses on the media gateway 2.In the specific implementation, described delete cells 22 can further comprise judging unit and deletion subelement, and described judging unit is used to judge whether the NAT map addresses of medium online storage surpasses the time that the keep-alive duration limits; Described deletion subelement is used in the judged result of described judging unit when being, deletion surpasses the NAT map addresses of keep-alive duration;
Described second transmitting element 23, be used for sending the NAT response message to described Media Gateway Controller 1, the NAT map addresses that described creating unit 21 is set up sends to Media Gateway Controller 1, and/or be used for reporting NAT deletion information to Media Gateway Controller 1, the NAT map addresses that described delete cells 22 is deleted sends to Media Gateway Controller 1.In the specific implementation, media gateway 2 is carried to Media Gateway Controller 1 for this private network address attribute nmt in response message after mapping out the global network address on the interface of appointment.In response message, the form of attribute nmt is:
PublicIPAddress " | " PublicPort, this form has provided the global network address after the mapping.
In the specific implementation, can be used for NAT deletion indication by expanding H.248 an incident of agreement, this incident can be context events or terminal affair.With the terminal affair is example, newly-increased natdr incident.This incident is carried the information of deleted NAT map addresses by parameter.
Media Gateway Controller 1 and media gateway 2 set up NAT map addresses between private network address and global network address for specific privately owned net address after, if the NAT type is Port Restricted Cone, if the address and the port addr2:port2 that exist NAT map addresses list item that the address and the port addr1:port1 of private network is mapped to global network, media gateway is being received on the addr2:port2 when the source address of global network is the IP message of addr3 (no matter being which port), whether transmit the IP message that the addr1:port1 that associates sends to addr3 (no matter being which port) before will judging earlier, if have, this IP message that media gateway then will receive on addr2:port2 sends to addr1:port1, otherwise does not transmit.Therefore media gateway need be preserved the destination address information that all map addresses Xiang Shangcong private networks send to global network.Also can make Media Gateway Controller 1 obtain or revise this information by extended medium gateway control protocol (H.248 or MGCP).In like manner, whether the NAT of Restricted Cone type has private network to mail to the IP message of certain specific purpose IP address and port before need checking.The condition of the NAT of Symmetric type is stricter, and the constraints of increase is: different destination addresses will map out different NAT map addresses.
Fig. 2 is the first embodiment schematic flow sheet that the embodiment of the invention realizes the method for NAT.As shown in Figure 2, the method for the realization NAT of present embodiment,
At step S300, Media Gateway Controller obtains private network address;
Media Gateway Controller all is the private network address that the SDP (SessionDescription Protocol, Session Description Protocol) by signaling protocol message such as SIP obtains calling party usually, and the NAT map addresses need be carried out in this address on media gateway.
At step S301, Media Gateway Controller sends the indication information that need set up the NAT map addresses to media gateway;
Described indication information comprises the private network address that need carry out the NAT map addresses, the sign that can also comprise the network interface of the sign of network interface of private network side and global network side, further, described indication information can also comprise the public network address that carries out NAT mapping with described private net address, forces the purpose of control NAT mapping to realize Media Gateway Controller.Concrete, the sign of the network interface of the sign of the network interface of described private network side and global network side also can realize by configuration in advance, if having only a private network interface or have only a global network interface, and also transmission interface sign not then.Expand an attribute H.248 and be used to indicate the NAT map addresses that requires establishment new, this attribute can be context property or terminal attribute.With the terminal attribute is example, newly-increased attribute nmt.Data type is a character string.When the NAT type be among Full Cone (full awl), Restricted Cone (restriction awl) and the Port Restricted Cone (port limit awl) any the time, the form of this property value is when issuing:
PrivateIterfaceID”|”PrivateIPAddress”|”PrivatePort”|”PublicIterfaceID。Wherein:
PrivateIterfaceID is the numbering of private network interface;
PrivateIPAddress is the IP address in the private network;
PrivatePort is the port numbers in the private network;
PublicIterfaceID is the numbering of global network interface;
Media gateway is carried to Media Gateway Controller in response message after mapping out the global network address on the interface of appointment for this private network address.In response message, the form of attribute nmt is:
PublicIPAddress " | " PublicPort, this form has provided the global network address after the mapping.
When the NAT type is Symmetric, in sending to the message of media gateway, Media Gateway Controller needs to increase indication purpose global network address.The form of parameter nmt is:
PrivateIterfaceID”|”PrivateIPAddress”|”PrivatePort”|”PublicIterfaceID”|”PublicIPAddress”|”PublicPort”|”DestinationIPAddress”|”DestinationPort。Wherein:
PrivateIterfaceID is the numbering of private network interface;
PrivateIPAddress is the IP address in the private network;
PrivatePort is the port numbers in the private network;
PublicIterfaceID is the numbering of global network interface;
PublicIPAddress is the IP address in the global network;
PublicPort is the port numbers in the global network;
DestinationIPAddress is the destination address of IP message in the global network;
DestinationPort is the destination interface of IP message in the global network.
Parameter nmt can also be defined by the form of character string tabulation, realizes once increasing a plurality of NAT map addresses.In the specific implementation, parameter nmt can also further define public network address and carry item, will send to media gateway with the public network address that described private net address carries out NAT mapping, forces the purpose of control NAT mapping to realize Media Gateway Controller.
In the specific implementation, the indication information that described first transmitting element 11 sends to media gateway also can comprise NAT deletion indication, and is at least a in NAT type indication information, the NAT keep-alive duration indication information.NAT type indication information and NAT keep-alive duration indication information can set up the indication information of NAT map addresses with need or NAT deletion indication issues simultaneously, also can issue separately.The indication of described NAT type is used to indicate the type of NAT mapping address, can an attribute of agreement be used to indicate the NAT type by expanding H.248, and this attribute can be context property or terminal attribute.With the terminal attribute is example, newly-increased attribute nattype, and value is an enumeration type, optional value comprises above four kinds of NAT address styles and non-NAT type.The keep-alive duration that the indication of described NAT keep-alive duration is used to indicate described NAT can an attribute of agreement be used to indicate NAT keep-alive duration by expanding H.248, and this attribute can be context property or terminal attribute.With the terminal attribute is example, newly-increased attribute kad, and data type can be integer, and unit can be millisecond.Described NAT deletion indication is used for indicating media gateway deletion NAT map addresses, can an attribute of agreement be used for the newly-increased indication of NAT by expanding H.248, and this attribute can be context property or terminal attribute.With the terminal attribute is example, newly-increased attribute natds, such as, when certain NAT map addresses no longer is used, Media Gateway Controller can initiatively be deleted by indicating media gateway.For example when media gateway is known end of calling from signaling message, then can initiatively delete the relevant NAT map addresses of this calling.Natds can also be defined by the form of character string tabulation, realizes once deleting a plurality of NAT map addresses.
At step S302, media gateway receives the indication information that need that Media Gateway Controller sends are set up the NAT map addresses, sets up the NAT map addresses between private network address and global network address.In the specific implementation, media gateway returns to Media Gateway Controller with the result of NAT map addresses in response message.When the need that are handed down to media gateway when Media Gateway Controller are set up and are not comprised public network address in the NAT map addresses indication information, the public network address in this response message after the portability NAT map addresses.After Media Gateway Controller has obtained global network address after the NAT map addresses, can replace private network address before the NAT map addresses in original signaling protocol message with this address, thereby realize passing through of NAT, simplify signaling process.
For the NAT map addresses of having set up, Media Gateway Controller can initiatively be deleted, and a kind of possible situation is: end of calling, the NAT map addresses that is used for this calling does not re-use.Media gateway also can initiatively report the existing NAT map addresses of deletion, and for example certain NAT map addresses initiatively reports deletion because of the keep-alive timer expiry.
Fig. 3 is that second example structure of the present invention system of realizing NAT is formed schematic diagram; As shown in Figure 3, the system of the realization NAT of present embodiment comprises media gateway 6 and Media Gateway Controller 7; Described media gateway 6 is used to receive the Media Stream that is sent to global network from private network, and according to the private network address of carrying in the described Media Stream, set up the NAT map addresses between private network address and global network address, and the NAT map addresses of setting up is sent to Media Gateway Controller maybe the NAT map addresses of deletion is sent to Media Gateway Controller.It is at least a that described Media Gateway Controller 7 is used for receiving NAT newly-added information and NAT deletion information that described media gateway 6 sends.
Further, still with reference to figure 3, described media gateway 6 comprises first receiving element 60, creating unit 61, delete cells 62 and transmitting element 63, wherein,
Described first receiving element 60 is used to receive the Media Stream that is sent to global network from private network;
Described creating unit 61, the private network address that is used for described Media Stream is set up the NAT map addresses; As previously mentioned, the form that the NAT map addresses of described foundation can mapping table exists.When the NAT type be among Full Cone (full awl), Restricted Cone (restriction awl) and the Port Restricted Cone (port limit awl) any the time, the NAT map addresses list item of described NAT map addresses parameter and 61 foundation of described creating unit is exemplified below:
The list item form:
PrivateIterfaceID”|”PrivateIPAddress”|”PrivatePort”|”PublicIterfaceID”|”PublicIPAddress”|”PublicPort。
When the NAT type was Symmetric, the NAT map addresses list item that described NAT map addresses parameter and described media gateway 2 are set up was exemplified below:
The list item form:
PrivateIterfaceID”|”PrivateIPAddress”|?”PrivatePort”|”PublicIterfaceID”|”PublicIPAddress”|”PublicPort”|”DestinationIPAddress”|”DestinationPort。
Described delete cells 62, be used to delete the NAT map addresses on the described media gateway 6, in the specific implementation, delete cells 62 comprises judging unit and deletion subelement, and described judging unit is used to judge whether the NAT map addresses of medium online storage surpasses the time that the keep-alive duration limits; Described deletion subelement is used in the judged result of described judging unit when being, deletion surpasses the NAT map addresses of keep-alive duration;
Described transmitting element 63 is used for reporting the NAT map addresses of the NAT map addresses of described foundation and described deletion at least a to described Media Gateway Controller 7.Expanding H.248, incident natar reports newly-increased NAT map addresses.It is character string that this incident is carried parameter m pr. data type.
When the NAT type be among Full Cone (full awl), Restricted Cone (restriction awl) and the Port RestrictedCone (port limit awl) any the time, the form of parameter m pr is as follows:
PrivateIterfaceID”|”PrivateIPAddress”|”PrivatePort”|”PublicIterfaceID”|?”PublicIPAddress”|”PublicPort
Wherein, PrivateIterfaceID is the numbering of private network interface
PrivateIPAddress is the IP address in the private network
PrivatePort is the port numbers in the private network
PublicIterfaceID is the numbering of global network interface
PublicIPAddress is the IP address in the global network
PublicPort is the port numbers in the global network.
When the NAT type was Symmetric, the form of parameter m pr was as follows:
PrivateIterfaceID”|”PrivateIPAddress”|”PrivatePort”|”PublicIterfaceID”|”PublicIPAddress”|”PublicPort”|”DestinationIPAddress”|”DestinationPort
PrivateIterfaceID is the numbering of private network interface
PrivateIPAddress is the IP address in the private network
PrivatePort is the port numbers in the private network
PublicIterfaceID is the numbering of global network interface
PublicIPAddress is the IP address in the global network
PublicPort is the port numbers in the global network
DestinationIPAddress is the destination address of IP message in the global network
DestinationPort is the destination interface of IP message in the global network.
The data type of parameter m pr also can be defined as the character string list type, is used for a plurality of newly-increased NAT map addresses of reporting events.
Expanding H.248, incident natdr reports deleted NAT map addresses.This incident is carried parameter m pd, and data type is a character string.The NAT map addresses that this parametric description is deleted.This parameter also may be defined to the character string list type, is used for a plurality of deleted NAT map addresses of reporting events one time.
Fig. 4 is the second embodiment schematic flow sheet that the embodiment of the invention realizes the method for NAT.As shown in Figure 4, the method for the realization NAT of present embodiment,
At step S400, media gateway receives the Media Stream that is sent to global network from private network;
At step S401, media gateway is that the private network address in the described Media Stream is set up the NAT map addresses;
At step S402, media gateway reports the NAT map addresses of new establishment to Media Gateway Controller.Expanding H.248, incident natar reports newly-increased NAT map addresses.It is character string that this incident is carried parameter m pr. data type.
When the NAT type be among Full Cone (full awl), Restricted Cone (restriction awl) and the Port RestrictedCone (port limit awl) any the time, the form of parameter m pr is as follows:
PrivateIterfaceID”|”PrivateIPAddress”|”PrivatePort”|”PublicIterfaceID”|”PublicIPAddress”|”PublicPort。
Wherein, PrivateIterfaceID is the numbering of private network interface;
PrivateIPAddress is the IP address in the private network;
PrivatePort is the port numbers in the private network;
PublicIterfaceID is the numbering of global network interface;
PublicIPAddress is the IP address in the global network;
PublicPort is the port numbers in the global network.
When the NAT type was Symmetric, the form of parameter m pr was as follows:
PrivateIterfaceID”|”PrivateIPAddress”|”PrivatePort”|”PublicIterfaceID”|”PublicIPAddress”|”PublicPort”|”DestinationIPAddress”|”DestinationPort。Wherein:
PrivateIterfaceID is the numbering of private network interface;
PrivateIPAddress is the IP address in the private network;
PrivatePort is the port numbers in the private network;
PublicIterfaceID is the numbering of global network interface;
PublicIPAddress is the IP address in the global network;
PublicPort is the port numbers in the global network;
DestinationIPAddress is the destination address of IP message in the global network;
DestinationPort is the destination interface of IP message in the global network.
The data type of parameter m pr also can be defined as the character string list type, is used for a plurality of newly-increased NAT map addresses of reporting events.
At step S403, media gateway judges whether the NAT map addresses item of described foundation surpasses the time that the keep-alive duration is limited, if the judgment is Yes, and execution in step S404; If the judgment is No, keep described NAT;
At step S404, media gateway reports NAT deletion information to Media Gateway Controller, and described NAT deletion information is used to indicate Media Gateway Controller to delete the NAT map addresses of described media gateway deletion.Expanding H.248, incident natdr reports deleted NAT map addresses.This incident is carried parameter m pd, and data type is a character string.The NAT map addresses that this parametric description is deleted.This parameter also may be defined to the character string list type, is used for a plurality of deleted NAT map addresses of reporting events one time.
Step S403 and step S404 are optional step, do not need in some cases to be performed.For example, Media Gateway Controller may initiatively be deleted the NAT map addresses, and does not need the spontaneous judgement deletion of media gateway.
Embodiment of the invention media gateway receives the NAT map addresses indication information that Media Gateway Controller sends or receives when private network is sent to the Media Stream of global network, set up the NAT map addresses between private network address and global network address, thereby on media gateway, realized NAT, made media gateway can between global network and private network, carry out the routing forwarding of IP message.
More than two embodiment can simultaneously and deposit.The difference of these two embodiment mainly is the production method of NAT map addresses.After the NAT map addresses produced, the NAT map addresses can initiatively be deleted by Media Gateway Controller, also can be deleted by medium gateway to report.Media Gateway Controller can be provided with NAT type and/or keep-alive duration to media gateway under the situation of above two embodiment.This set can be media gateway level other, perhaps interface level, or NAT map addresses level other.
Through the above description of the embodiments, the those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better execution mode under a lot of situation.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words can embody with the form of software product, this computer software product is stored in the storage medium that can read, floppy disk as computer, hard disk or CD etc., comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
More than cited only be preferred embodiment of the present invention, can not limit the present invention's interest field certainly with this, therefore the equivalent variations of doing according to claim of the present invention still belongs to institute of the present invention covering scope.

Claims (19)

1, a kind of method that realizes NAT is characterized in that, comprising:
Media gateway receives need that Media Gateway Controller sends and sets up the indication information of NAT map addresses or receive when private network is sent to the Media Stream of global network, sets up the NAT map addresses between private network address and global network address.
2, the method for realization as claimed in claim 1 NAT is characterized in that, also comprises before media gateway receives the NAT map addresses indication information that Media Gateway Controller sends:
Media Gateway Controller obtains private network address;
Media Gateway Controller sends to media gateway need set up NAT map addresses indication information, and described indication information comprises described private network address.
3, the method for realization NAT as claimed in claim 2 is characterized in that described indication information further comprises the interface identifier of private network side, and is at least a in the interface identifier of global network address and global network side.
4, the method for realization NAT as claimed in claim 2 is characterized in that, also comprises after the described NAT map addresses of setting up between the private network and the total network address:
Media gateway is created by NAT and is replied after described NAT map addresses is set up in the Media Gateway Controller transmission, the global network address after the described private net address mapping.
5, the method for realization NAT as claimed in claim 1 is characterized in that, also comprises:
Media gateway receives the NAT deletion indication information that Media Gateway Controller sends, and deletes described NAT map addresses according to described NAT deletion indication information.
6, as the method for the described realization of claim 1-4 NAT, it is characterized in that,
Described media gateway receives in NAT type indication information that Media Gateway Controller sends, the NAT keep-alive duration indication information at least a; described NAT type indication information is used to indicate described media gateway to set up the respective type of NAT map addresses, and described keep-alive duration is used to indicate the retention time of the NAT map addresses that described media gateway sets up.
7, the method for realization NAT as claimed in claim 1 is characterized in that media gateway receives the Media Stream that is sent to global network from private network, sets up after the NAT map addresses between private network address and global network address, also comprises:
Media gateway reports the NAT newly-added information to described Media Gateway Controller, and the NAT map addresses that described media gateway is set up sends to Media Gateway Controller.
8, the method for realization NAT as claimed in claim 1 is characterized in that, also comprises:
Media gateway reports NAT deletion information to Media Gateway Controller, and the NAT map addresses that described media gateway is deleted sends to Media Gateway Controller.
9, the method for realization as claimed in claim 8 NAT is characterized in that, described media gateway reports NAT deletion information to Media Gateway Controller, the NAT map addresses of described media gateway deletion is sent to Media Gateway Controller comprise:
Judge whether the NAT that stores on the described media gateway surpasses the time that the keep-alive duration is limited; if the judgment is Yes; media gateway is deleted described NAT; and report NAT deletion information to Media Gateway Controller, indicate described Media Gateway Controller to delete the NAT map addresses of described media gateway deletion.
10, a kind of media gateway is characterized in that, comprising:
Receiving element, the need that are used for the transmission of receiving media gateway controller are set up NAT map addresses indication information or are received the Media Stream that is sent to global network from private network;
Creating unit is used for according to described NAT map addresses indication information or describedly is sent to the Media Stream of global network from private network, sets up the NAT map addresses between private network address and global network address.
11, media gateway as claimed in claim 10; it is characterized in that; it is at least a that described receiving element also is used for NAT type indication information, NAT keep-alive duration indication information and NAT deletion indication information that the receiving media gateway controller sends; described NAT type indication information is used to indicate the respective type of the NAT map addresses that described media gateway sets up, and described keep-alive duration is used to indicate the retention time of the NAT map addresses that described media gateway sets up.
12, as claim 10 or 11 described media gateway, it is characterized in that, also comprise:
Delete cells is used for initiatively deleting described NAT map addresses or deletes described NAT map addresses according to the NAT deletion indication information that described Media Gateway Controller sends.
13, media gateway as claimed in claim 12 is characterized in that, also comprises:
Transmitting element, be used for to Media Gateway Controller send NAT newly-added information, NAT create reply and NAT deletion information at least a, the newly-increased message of described NAT is used for the NAT map addresses that described media gateway is set up is sent to Media Gateway Controller, and described NAT deletion information is used to indicate Media Gateway Controller to delete the NAT map addresses of described delete cells deletion.
14, media gateway as claimed in claim 12 is characterized in that, described delete cells comprises:
Judging unit is used to judge whether the NAT map addresses of medium online storage surpasses the time that the keep-alive duration limits;
The deletion subelement is used in the judged result of described judging unit when being, deletion is above the NAT map addresses of keep-alive duration.
15, a kind of Media Gateway Controller is characterized in that, comprising:
Transmitting element is used for sending the indication information that need set up the NAT map addresses to media gateway.
16, Media Gateway Controller as claimed in claim 15 is characterized in that, also comprises:
Acquiring unit is used to obtain private network address, and described private network address is carried in the indication information that need set up the NAT map addresses by transmitting element and sends to media gateway.
17, Media Gateway Controller as claimed in claim 15 is characterized in that, it is at least a that described transmitting element also is used for sending NAT type indication information, NAT keep-alive duration indication information and NAT deletion indication information to described media network.
18, Media Gateway Controller as claimed in claim 15 is characterized in that, also comprises:
Receiving element, be used for NAT that the receiving media gateway sends create reply, NAT newly-added information and NAT deletion information is at least a.
19, Media Gateway Controller as claimed in claim 15 is characterized in that, also comprises:
Memory cell is used to store the NAT map addresses.
CNA2008100271351A 2008-03-31 2008-03-31 Method and device for realizing NAT Pending CN101552745A (en)

Priority Applications (2)

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

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN101552745A true CN101552745A (en) 2009-10-07

Family

ID=41134829

Family Applications (1)

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

Country Status (2)

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

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2262184A1 (en) * 2008-04-03 2010-12-15 Huawei Technologies Co., Ltd. Network address translation address mapping table maintaining method, media gateway and its controller
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
WO2015106389A1 (en) * 2014-01-14 2015-07-23 华为技术有限公司 Network address translation method and apparatus
CN106878259A (en) * 2016-12-14 2017-06-20 新华三技术有限公司 A kind of message forwarding method and device
WO2017167018A1 (en) * 2016-03-28 2017-10-05 华为技术有限公司 Mapping keepalive method and apparatus for network address translation
CN113242325A (en) * 2021-04-08 2021-08-10 华南理工大学 UDP (user Datagram protocol) traversal method of incremental symmetric NAT (network Address translation)

Families Citing this family (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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7224696B2 (en) * 2002-06-10 2007-05-29 Nortel Networks, Ltd. Access nodes in packet-based communications networks
CN1232084C (en) * 2002-08-09 2005-12-14 华为技术有限公司 Method for readlizing voice communication between medium gates based on medium gate control protocol
US7380011B2 (en) * 2003-10-01 2008-05-27 Santera Systems, Inc. Methods and systems for per-session network address translation (NAT) learning and firewall filtering in media gateway

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2262184A4 (en) * 2008-04-03 2011-04-20 Huawei Tech Co Ltd Network address translation address mapping table maintaining method, media gateway and its controller
US8422391B2 (en) 2008-04-03 2013-04-16 Huawei Technologies Co., Ltd. Method, media gateway and media gateway controller for maintaining NAT address mapping table
EP2262184A1 (en) * 2008-04-03 2010-12-15 Huawei Technologies Co., Ltd. Network address translation address mapping table maintaining method, media gateway and its controller
US9380133B2 (en) 2013-03-12 2016-06-28 Huawei Technologies Co., Ltd. Communication method, apparatus and system
WO2014139094A1 (en) * 2013-03-12 2014-09-18 华为技术有限公司 Communication method, device and system
CN104247349A (en) * 2013-03-12 2014-12-24 华为技术有限公司 Communication method, device and system
CN104168338A (en) * 2013-05-16 2014-11-26 杭州迪普科技有限公司 Network address conversion device and network address conversion method
WO2015106389A1 (en) * 2014-01-14 2015-07-23 华为技术有限公司 Network address translation method and apparatus
WO2017167018A1 (en) * 2016-03-28 2017-10-05 华为技术有限公司 Mapping keepalive method and apparatus for network address translation
US10764243B2 (en) 2016-03-28 2020-09-01 Huawei Technologies Co., Ltd. Method and apparatus for keeping network address translation mapping alive
CN106878259A (en) * 2016-12-14 2017-06-20 新华三技术有限公司 A kind of message forwarding method and device
CN106878259B (en) * 2016-12-14 2020-12-11 新华三技术有限公司 Message forwarding method and device
CN113242325A (en) * 2021-04-08 2021-08-10 华南理工大学 UDP (user Datagram protocol) traversal method of incremental symmetric NAT (network Address translation)
CN113242325B (en) * 2021-04-08 2022-01-21 华南理工大学 UDP (user Datagram protocol) traversal method of incremental symmetric NAT (network Address translation)

Also Published As

Publication number Publication date
WO2009121267A1 (en) 2009-10-08

Similar Documents

Publication Publication Date Title
CN101552803B (en) Method for maintaining network address translation address mapping table, media gateway and controller thereof
CN101552745A (en) Method and device for realizing NAT
US7684397B2 (en) Symmetric network address translation system using STUN technique and method for implementing the same
US8082324B2 (en) Method of establishing a tunnel between network terminal devices passing through firewall
CN101938532B (en) UDP-based method and system for penetrating through NAT equipment
CN101577722B (en) Method for realizing MAC forced forwarding function and device
WO2005011216A1 (en) The system and method for realize multimedia call crossover the private network
CN102281180A (en) Virtual network interface card (NIC) communication device applied in mutual communication of terminals in different local area networks
US20110153809A1 (en) Legal Intercept
CN112437168B (en) Intranet penetration system
CN101390362B (en) Client for networked communication device and method for establishing media session
CN102780675B (en) Transmission method, device and system for streaming media service
CN101257435B (en) Implementing method of SIP application-level gateways based on NAT-PT
CN105516176A (en) Call center system, communication connection method and device of call center system
CN103685032A (en) Message forwarding method and network address conversion server
JP5214318B2 (en) Gateway device, VoIP network interconnection system, communication method, and program
CN101651606A (en) Method, device and system for forwarding message
CN101729367B (en) Method, equipment and system for realizing network address conversion
CN100571374C (en) Video recording and real time play-back method
JP2008047968A (en) Communication system and method for sharing network equipment
CN102420835B (en) Method for realizing real-time transport protocol (RTP) media stream agent in unified communication system
CN108833434B (en) Method for realizing cross-network video call system based on IP bidirectional network set top box
CN101772195B (en) Establishing and joining method of IMS (information management system) trunking conference, distribution system and device
CN101325564B (en) Method, apparatus and system for selecting virtual medium gateway
CN100401730C (en) Method for realizing user's self difined recording by media gate control protocol

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Open date: 20091007