CN100493049C - Method for applying layer gateway used for network address conversion and in protocol translation - Google Patents

Method for applying layer gateway used for network address conversion and in protocol translation Download PDF

Info

Publication number
CN100493049C
CN100493049C CNB2005100701002A CN200510070100A CN100493049C CN 100493049 C CN100493049 C CN 100493049C CN B2005100701002 A CNB2005100701002 A CN B2005100701002A CN 200510070100 A CN200510070100 A CN 200510070100A CN 100493049 C CN100493049 C CN 100493049C
Authority
CN
China
Prior art keywords
sip
ipv6
user terminal
ipv4
alg
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.)
Expired - Fee Related
Application number
CNB2005100701002A
Other languages
Chinese (zh)
Other versions
CN1674565A (en
Inventor
李丹
王春峰
李忠诚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of Computing Technology of CAS
Original Assignee
Institute of Computing Technology of CAS
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 Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CNB2005100701002A priority Critical patent/CN100493049C/en
Publication of CN1674565A publication Critical patent/CN1674565A/en
Application granted granted Critical
Publication of CN100493049C publication Critical patent/CN100493049C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention alates to an implementation method of SIP application layer gateway for IPv4/IPv6 network address conversion and protocol translation. Said method includes the following steps: firstly, creating a static mapping entry for boundary SIP proxy server of IPv6 domain in address mapping table of NAT-PT system; NAT-PT system can be used for identifying data packet of SIP protocol, and transferring the data packet onto application layer gateway to make processing; said processing includes two portions; first, translation processing of SIP message head field; and second, translation processing of SDP message body contents; finally, the SIP application layer gateway can transmit out the translation-processed SIP data packet.

Description

A kind of method that is used for the ALG of network address translation and protocol translation
Technical field
The present invention relates to the ALG technical field of computer network communication, particularly a kind of implementation method that is used for the SIP ALG of IPv4 and IPv6 network address translation and protocol translation.
Background technology
IPv6 (Internet Protocol Version 6) agreement is the Next Generation Internet agreement that substitutes IPv4 (Internet ProtocolVersion 4) agreement, and it has many new characteristics and function.Interim IPv4 and IPv6 technology will keep long-time coexistence during network transition, and finally carry out the transition to IPv6.At present, how to realize that it is the problem that people face that the IPv4 agreement seamlessly transits to the IPv6 agreement.IETF working group has proposed the mechanism of several realization IPv4 and IPv6 intercommunication: dual stack (illustrating among the RFC2893), tunneling technique (illustrating among the RFC2893), NAT-PT (Network Address TransitionProtocol, network address translation and protocol translation mechanism illustrate among the RFC2766) etc.NAT-PT is a kind of protocol conversion technology, with the problem that solves pure IPv6 network and pure IPv4 network interworking.Its main thought is when the communicating by letter of IPv6 node and IPv4 node, and by means of the NAT-PT system of centre, the network layer protocol head is carried out conversion between IPv6/IPv4, to adapt to the protocol type of opposite end.
Because this transient mode of NAT-PT, only the intercommunication that converting system can be finished IPv6 network and IPv4 network need be set in the centre, use comparatively easyly, be applicable to network interworking demand commonly used.Yet upper-layer protocol for some embedded address informations, as DNS (Domain NameService) and SIP (Session Initiation Protocol, conversation initialized protocol) agreement etc., NAT-PT needs and translation is finished in ALG (Application Level Gateway, the gateway of application layer) cooperation.Aspect realization, if there is not the support of DNS ALG, IPV6 network and IPV4 network just can not communicate by domain name.
Session Initiation Protocol be one can be for the standard session agreement of uses such as multi-medium data transmission and Internet phone call.What be based on text code is structured in UDP (User Datagram Protocol, User Datagram Protoco (UDP)) and TCP (Transfer Control Protocol, transmission control protocol) on, is used to create, revise and stop the application layer control signaling protocol of session connection.SDP (SessionDescription Protocol, Session Description Protocol illustrates among the RFC2327) and SIP are defined by IETF (international project task groups) MMUSIC (Multimedia session control in many ways) working group.The SDP data content is based on text code, and the character set of use is ISO10646.The SDP head is used in and mainly contains three purposes in the SIP signaling message, and the one, inform that the other side oneself wants to receive the medium of which kind of type: audio frequency, video or all have, the secondth, wish the other side uses the coding method of what type.Another allows it know address and the port that oneself is used for receiving media stream.Same the other side also need provide above these information in response message or request, reply the coded system that provides and to be the subclass of the coded system of being supported in the other side's request message, if both sides do not have the common coded system of supporting, the merit of then failing to consultations, session connection failure.The SIP system is made up of SIP UA (User Agent, user agent, sip user terminal) and SIP Proxy (agency) server.Use for SIP, the information of IP address is contained in the inside of sip message bag, when IPv4 and two kinds of heterogeneous networks of IPv6 are got in the free clothing that includes Session Initiation Protocol, need translate the IP address of Session Initiation Protocol bag inside, otherwise both sides' communication just can not be set up.SIP ALG is the particular agent of using corresponding to SIP, can make IPv6 node and IPv4 node mutual communication.There is the network address in the load of package in SIP application meeting, but the content that deposit the load the inside also can't be learnt by NAT-PT system itself, and SIP ALG can assist the NAT-PT system to finish the function of translation payload content.
The mechanism of NAT-PT illustrates in RFC2766, but the inside does not illustrate the realization mechanism of SIP ALG, and up to the present also not about in NAT-PT, realizing the mechanism of SIP ALG and the standard that can follow.The present invention has provided the implementation method of the SIP ALG of a kind of NAT-PT of being used for.
Summary of the invention
The implementation method that the purpose of this invention is to provide the SIP ALG of a kind of IPv4/IPv6 of being used for network address translation and protocol translation is to realize IPv4 sip user terminal and IPv6 sip user terminal mutual communication.
The object of the present invention is achieved like this: a kind of implementation method that is used for the SIP ALG of IPv4/IPv6 network address translation and protocol translation comprises:
(1) at first be the map addresses clauses and subclauses of the static state of border sip proxy server distribution in the IPv6 territory in the address mapping table of NAT-PT system, the content of these clauses and subclauses is: the IPv6 address of the border sip proxy server in the IPv6 territory and the global I Pv4 address of its correspondence;
(2) the NAT-PT system discerns the packet of Session Initiation Protocol according to purpose information or port information, packet is sent on the SIP ALG handle;
(3) the SIP ALG is handled the packet of Session Initiation Protocol, specifically comprises:
(21) IPv6 Session Initiation Protocol bag is to the conversion process of IPv4 Session Initiation Protocol bag;
(22) IPv4 Session Initiation Protocol bag is to the conversion process of IPv6 Session Initiation Protocol bag;
Wherein, described IPv6SIP protocol package comprises to the conversion process of IPv4 Session Initiation Protocol bag:
(41) treatment S IP protocol headers field: the header fields to Session Initiation Protocol carries out conversion process, comprise fields such as Contact, Via, Record-Route, Route, Request-URI, From, To and Content-Length, the IPv6 address of SIP header fields and port information are converted to IPv4 address and port information, set up the map entry of IPv4 network to the IPv6 network;
(42) content of treatment S DP agreement: " c=" field and " m=" field according to the SDP bag judge whether the map entry of RTP is set up, if do not set up, then set up map entry for RTP and RTCP, then, the protocol type of " c=" field is changed into IP4 by IP6, is the IPv6 address transition IPv4 address of map entry, and the port information of " m=" field is converted to the port information of the IPv4 of map entry, and the address part of " o=" field is changed;
(43) through the processing of step (42), the size of SDP content has changed, and needs to revise the Content-Length field of Session Initiation Protocol head;
(44) to packet recomputate IPv4 head and UDP head verification and, then, execution in step (4);
(4) last, the SIP packet after the SIP ALG will be handled sends.
Described step (22) IPv4 Session Initiation Protocol bag comprises to the conversion process of IPv6 Session Initiation Protocol bag:
IPv4 Session Initiation Protocol bag during the SIP ALG is handled the packet of Session Initiation Protocol is to the conversion process of IPv6 Session Initiation Protocol bag,
(51) treatment S IP protocol headers field: the header fields to Session Initiation Protocol carries out conversion process, comprise fields such as Contact, Via, Record-Route, Route, Request-URI, From, To, Content-Length, the IPv4 address of SIP header fields and port information are converted to IPv6 address and port information, the query mappings table, the map entry that taking-up inquires carries out the conversion process of relevant field;
(52) " o=", " c=" and " m=" field of the content of treatment S DP agreement: treatment S DP bag, the protocol type of " c=" and " o=" field field is being changed into IP6 by IP4, is the IPv4 address transition IPv6 address, and the port information of " m=" field is constant;
(53) through the processing of step (52), the size of SDP content has changed, and needs to revise the Content-Length field of SIP head;
(54) to the verification of packet UDP head again and, then, execution in step (4).
A kind of network topology structure that is used for the SIP ALG of network address translation and protocol translation is: comprise a border SIP Proxy server and IPv6 dns server in the IPv6 network domains, on the IPv6 SIP Proxy server of IPv6 sip user endpoint registration in this territory, comprise a border SIP Proxy server and IPv4 dns server in the IPv4 network domains, on the IPv4 SIP Proxy server of IPv4 sip user endpoint registration in this territory, comprising:
When (61) IPv6 sip user terminal initiatively makes a call request, the SIP ALG needs SIP relevant field and the SDP relevant field in the treatment S IP INVITE, and set up RTP and the RTCP map entry of IPv4 sip user terminal to IPv6 sip user terminal, the SIP ALG needs the SIP relevant field of treatments B YE message, and deletion IPv4 sip user terminal is to the RTP and the RTCP map entry of IPv6 sip user terminal, the SIP ALG needs SIP relevant field and SDP relevant field in the processing messages to other sip messages, and the packet of rtp streaming is handled by the NAT-PT system;
When (62) IPv4 sip user terminal initiatively makes a call request, the SIP ALG needs SIP relevant field and the SDP relevant field in the treatment S IP 200 OK message, and set up RTP and the RTCP map entry of IPv4SIP user terminal to IPv6 sip user terminal, the SIP ALG needs the SIP relevant field of treatments B YE message, and deletion IPv4 sip user terminal is to the RTP and the RTCP map entry of IPv6 sip user terminal, the SIP ALG needs SIP relevant field and SDP relevant field in the processing messages to other sip messages, and the packet of rtp streaming is handled by the NAT-PT system.
The another kind of network topology structure that is used for the SIP ALG of network address translation and protocol translation is: do not have SIP Proxy server in the IPv6 network domains, on the IPv4 SIP Proxy server of IPv6 sip user endpoint registration in the IPv4 territory, comprise a border SIPProxy server in the IPv4 network domains, on the IPv4 SIP Proxy server of IPv4 sip user endpoint registration in this territory, comprising:
(71) IPv6 sip user terminal is when IPv4 SIP Proxy server registration, the SIP ALG needs the SIP relevant field of treatment S IP REGISTER message, and set up the map entry of IPv4SIP Proxy, other a sip message treatment S IP relevant field to IPv6 sip user terminal;
When (72) IPv6 sip user terminal initiatively makes a call request, the SIP ALG needs SIP relevant field and the SDP relevant field in the treatment S IP INVITE, and set up RTP and the RTCP map entry of IPv4 sip user terminal to IPv6 sip user terminal, the SIP ALG needs the SIP relevant field of treatments B YE message, and deletion IPv4 sip user terminal is to the RTP and the RTCP map entry of IPv6 sip user terminal, the SIP ALG needs SIP relevant field and SDP relevant field in the processing messages to other sip messages, and the packet of rtp streaming is handled by the NAT-PT system;
When (73) IPv4 sip user terminal initiatively makes a call request, the SIP ALG needs SIP relevant field and the SDP relevant field in the treatment S IP 200 OK message, and set up RTP and the RTCP map entry of IPv4SIP user terminal to IPv6 sip user terminal, the SIP ALG needs the SIP relevant field of treatments B YE message, and deletion IPv4 sip user terminal is to the RTP and the RTCP map entry of IPv6 sip user terminal, the SIP ALG needs SIP relevant field and SDP relevant field in the processing messages to other sip messages, and the packet of rtp streaming is handled by the NAT-PT system.
The another kind of network topology structure that is used for the SIP ALG of network address translation and protocol translation is: comprise a border SIP Proxy server in the IPv6 network domains, on the IPv6 SIP Proxy server of IPv6 sip user endpoint registration in this territory, there is not the SIPProxy server in the IPv4 network domains, on the IPv6 SIP Proxy server of IPv4 sip user endpoint registration in the IPv6 territory, comprising:
(81) IPv4 sip user terminal is when IPv6 SIP Proxy server registration, and the SIP ALG needs the SIP relevant field of treatment S IP message;
When (82) IPv6 sip user terminal initiatively makes a call request, the SIP ALG needs SIP relevant field and the SDP relevant field in the treatment S IP INVITE, and set up RTP and the RTCP map entry of IPv4 sip user terminal to IPv6 sip user terminal, the SIP ALG needs the SIP relevant field of treatments B YE message, and deletion IPv4 sip user terminal is to the RTP and the RTCP map entry of IPv6 sip user terminal, the SIP ALG needs SIP relevant field and SDP relevant field in the processing messages to other sip messages, and the packet of rtp streaming is handled by the NAT-PT system;
When (83) IPv4 sip user terminal initiatively makes a call request, the SIP ALG needs SIP relevant field and the SDP relevant field in the treatment S IP 200 OK message, and set up RTP and the RTCP map entry of IPv4SIP user terminal to IPv6 sip user terminal, the SIP ALG needs the SIP relevant field of treatments B YE message, and deletion IPv4 sip user terminal is to the RTP and the RTCP map entry of IPv6 sip user terminal, the SIP ALG needs SIP relevant field and SDP relevant field in the processing messages to other sip messages, and the packet of rtp streaming is handled by the NAT-PT system.
By technical scheme that the invention described above provided as can be seen, by in the NAT-PT system, increasing SIP ALG ALG, simultaneously, under the assistance of DNS ALG ALG, can realize the mutual communication of IPv4 sip user terminal and IPv6 sip user terminal.When this invention had solved IPv4 network and IPv6 network and exists jointly, IPv4 SIP used and the communication issue of IPv6 SIP application.
The inventive method solved that Session Initiation Protocol in the IPv4 network is used and the IPv6 network in the mutual communication problem of Session Initiation Protocol between using.
Description of drawings
The front has been carried out briefly bright to purpose of the present invention, below in conjunction with accompanying drawing main contents of the present invention are described, and the accompanying drawing that comprises mainly contains:
Fig. 1 is one embodiment of the present of invention, has a kind of network topology structure schematic diagram of the SIP ALG of IPv4/IPv6 protocol translation;
Fig. 2 has described an embodiment according to Fig. 1 network topology structure, when IPv6 sip user terminal at first makes a call request, through the process chart of SIP ALG;
Fig. 3 has described an embodiment according to Fig. 1 network topology structure, when IPv4 sip user terminal at first makes a call request, through the process chart of SIP ALG;
Fig. 4 is an alternative embodiment of the invention, has the another kind of network topology structure schematic diagram of the SIP ALG of IPv4/IPv6 protocol translation;
Fig. 5 has described an embodiment according to Fig. 4 network topology structure, when IPv6 sip user terminal is registered to IPv4 SIP Proxy, through the process chart of SIP ALG;
Fig. 6 has described an embodiment according to Fig. 4 network topology structure, when IPv6 sip user terminal at first makes a call request, through the process chart of SIP ALG;
Fig. 7 has described an embodiment according to Fig. 4 network topology structure, when IPv4 sip user terminal at first makes a call request, through the process chart of SIP ALG;
Fig. 8 is an alternative embodiment of the invention, has the another kind of network topology structure schematic diagram of the SIP ALG of IPv4/IPv6 protocol translation;
Fig. 9 has described an embodiment according to Fig. 8 network topology structure, when IPv4 sip user terminal is registered to IPv6 SIP Proxy, through the process chart of SIPALG;
Figure 10 has described an embodiment according to Fig. 8 network topology structure, when IPv6 sip user terminal at first makes a call request, through the process chart of SIP ALG;
Figure 11 has described an embodiment according to Fig. 8 network topology structure, when IPv4 sip user terminal at first makes a call request, through the process chart of SIP ALG.
Embodiment
The present invention is applicable to the multiple network topological environmental.
A kind of network topology environment comprises a border IPv6 SIPProxy server X and IPv6 dns server DNS_A as shown in Figure 1 in the IPv6 network domains A, IPv6 sip user terminal X ' is registered on the IPv6 SIP Proxy server X in this territory.Comprise a border SIP Proxy server Y and IPv4 dns server DNS_B in the IPv4 network domains B, IPv4 sip user terminal Y ' is registered on the IPv4 SIP Proxy server Y in this territory.The NAT-PT system is between IPv6 network domains A and IPv4 network domains B.
In conjunction with the network topology environment of Fig. 1, IPv6 SIP Proxy server X in the IPv6 network domains A and the domain name mapping between the IPv4 SIP Proxy server Y in the IPv4 network domains B are assisted to realize by DNSALG and NAT-PT system.In addition, in order to support IPv4SIP user terminal Y ' in the IPv4 network domains B, need in the NAT-PT system, the static mappings clauses and subclauses that the IPv4 address is arrived in an IPv6 address be set for IPv6 SIP Proxy server X to initiatively making a call request of IPv6 sip user terminal X '.The embodiment of the implementation method of the SIP ALG of a kind of IPv4/IPv6 of being used for network address translation of the present invention and protocol translation is described below in conjunction with the accompanying drawings:
Fig. 2 is according to a kind of concrete enforcement of the present invention, describe in a kind of implementation method of the SIP ALG that is used for IPv4/IPv6 network address translation and protocol translation, an embodiment according to Fig. 1 network topology structure, when IPv6 sip user terminal X ' at first makes a call request, through the handling process of SIP ALG.
At first, caller IPv6 sip user terminal X ' sends communication request message (INVITE) to IPv6SIP Proxy X (step S201), IPv6 SIP Proxy X is by the IP address of domain name mapping IPv4 SIP ProxyY, and DNS ALG assists to finish the conversion of IPv4/IPv6 domain name type and IP address.
Then, IPv6 SIP Proxy X transmits INVITE to IPv4 SIP Proxy Y, and must pass through the NAT-PT system this moment, arrives SIP ALG and handles (step S202).When SIP ALG receives this bag, do following work: translate the relevant field of SIP head, IPv4 address and port information are translated in IPv6 address in the field and port information.Then translate " o=", " c=" and " m=" field in the SDP bag, set up RTP and the RTCP passage map entry of IPv4SIP user terminal Y ' to IPv6 sip user terminal X ' according to the IP address and the port information of " c=" and " m=" field.Because SDP bag is through after revising, variation has taken place in length, so, need to revise the value of " Content-Length " field in the SIP header information.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, SIP ALG forwards amended IPv4 SIPINVITE bag, arrives IPv4 sip user terminal Y ' through step S203 and step S204.
After IPv4 sip user terminal Y ' receives INVITE, send IPv4 Ringing message (step S205), this message arrives SIP ALG and handles (step S206) through IPv4 SIP Proxy Y and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP Ringing message bag is forwarded, arrive IPv6SIP user terminal X ' through step S207 and step S208.
After IPv4 sip user terminal Y ' receives INVITE, decision call accepted request, then send IPv4 SIP 200 OK message (step S209), this message arrives SIP ALG and handles (step S210) through IPv4 SIP Proxy Y and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then translate " o=", " c=" and " m=" field in the SDP bag.Because the SDP bag is through after revising, variation has taken place in length, at this moment needs to revise the value of Content-Length.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP 200 OK forwards are gone out, arrive IPv6SIP user terminal X ' through step S211 and step S212.
After IPv6 sip user terminal X ' receives SIP 200 OK message, send IPv6 SIP ACK message (step S213), this message arrives SIP ALG and handles (step S214) through IPv6 SIP Proxy X and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP ACK forwards is gone out, arrive IPv4 sip user terminal Y ' through step S215 and step S216.
Behind the three-way handshake through top sip message, both sides' SIP session is set up and is finished, beginning both sides' RTP communication.After IPv6 RTP message bag arrives the NAT-PT system (step S217), not needing to deliver to SIP ALG handles, directly carrying out normal IPv6 udp protocol by the NAT-PT system handles to the translation of IPv4 udp protocol, message after translation is handled is IPv4 RTP message, is sent to IPv4 sip user terminal Y ' (step S218).After IPv4 RTP message bag arrives the NAT-PT system (step S219), because the map entry that need this moment is set up in the process that the SIP session is set up, so IPv4 RTP message can be handled to the translation of IPv6 udp protocol by the normal IPv4UDP agreement of NAT-PT system, message after translation is handled is IPv6 RTP message, is sent to IPv6 sip user terminal X ' (step S220).Like this, IPv6 sip user terminal X ' and IPv4 sip user terminal Y ' just can hear mutual voice messaging.
Behind IPv6 sip user terminal X ' and IPv4 sip user terminal Y ' end of conversation, suppose the first on-hook of IPv4 sip user terminal Y ', send IPv4 BYE message (step S221).This message arrives SIP ALG and handles (step S222) through IPv4 SIP Proxy Y and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.RTP and the RTCP map entry set up before the deletion.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP BYE forwards is gone out, arrive IPv6 sip user terminal X ' through step S223 and step S224.
IPv6 sip user terminal X ' receives the other side's BYE message, sends IPv6 200 OK message (step S225), and this message arrives SIP ALG and handles (step S226) through IPv6 SIP Proxy X and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP 200 OK forwards are gone out, arrive IPv4 sip user terminal Y ' through step S227 and step S228.Both sides' voice call stops.
Fig. 3 is according to a kind of concrete enforcement of the present invention, the flow process of the SIP call treatment when at first making a call request according to an example I Pv4 sip user terminal Y ' of Fig. 1 network topology structure is described in a kind of implementation method of the SIP ALG that is used for IPv4/IPv6 network address translation and protocol translation.
At first, caller IPv4 sip user terminal Y ' sends communication request message (INVITE) to IPv4SIP Proxy Y (step S301), IPv4 SIP Proxy Y is by the IPv4 address of domain name mapping IPv6 SIP Proxy X, and DNS ALG assists to finish the conversion of IPv4/IPv6 domain name type and IP address.
Then, IPv4 SIP Proxy Y transmits INVITE to IPv6 SIP Proxy X, and must pass through the NAT-PT system this moment, arrives SIP ALG and handles (step S302).When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then translate " o=", " c=" and " m=" field in the SDP bag.Because SDP bag is through after revising, variation has taken place in length, so, need to revise the value of " Content-Length " field of SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP INVITE bag is forwarded, arrive IPv6 sip user terminal X ' through step S303 and step S304.
After IPv6 sip user terminal X ' receives INVITE, send IPv6 Ringing message (step S305), this message arrives SIP ALG and handles (step S306) through IPv6 SIP Proxy X and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP Ringing message bag is forwarded, arrive IPv4 sip user terminal Y ' through step S307 and step S308.
After IPv6 sip user terminal X ' receives INVITE, decision call accepted request, then send IPv6 SIP 200 OK message (step S309), this message arrives SIP ALG and handles (step S310) through IPv6 SIP Proxy X and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then translate " o=", " c=" and " m=" field in the SDP bag, set up RTP and the RTCP passage map entry of IPv4 sip user terminal Y ' to IPv6 sip user terminal X ' according to the IP address and the port information of " c=" and " m=" field.Because SDP bag is through after revising, variation has taken place in length, at this moment needs to revise the value of " Content-Length " field of SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP 200 OK forwards are gone out, arrive IPv4 sip user terminal Y ' through step S311 and step S312.
After IPv4 sip user terminal Y ' receives SIP 200 OK message, send IPv4 SIP ACK message (step S313), this message arrives SIP ALG and handles (step S314) through IPv4 SIP Proxy Y and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP ACK forwards is gone out, arrive IPv6 sip user terminal X ' through step S315 and step S316.
Behind the three-way handshake through top sip message, both sides' SIP session is set up and is finished, beginning both sides' RTP communication.After IPv4 RTP message bag arrives the NAT-PT system (step S317), because the map entry that need this moment is set up in the process by SIP session foundation, so IPv4RTP message can be handled to the translation of IPv6 udp protocol by the normal IPv4 udp protocol of NAT-PT system, message after translation is handled is IPv6 RTP message, is sent to IPv6 sip user terminal X ' (step S318).After IPv6 RTP message bag arrives the NAT-PT system (step S319), not needing to deliver to SIP ALG handles, directly handle to the translation of IPv4 udp protocol by the normal IPv6 udp protocol of NAT-PT system, message after translation is handled is IPv4 RTP message, is sent to IPv4 sip user terminal Y ' (step S320).Like this, IPv6 sip user terminal X ' and IPv4SIP user terminal Y ' just can hear mutual voice messaging.
Behind IPv6 sip user terminal X ' and IPv4 sip user terminal Y ' end of conversation, suppose the first on-hook of IPv6 sip user terminal X ', send IPv6 SIP BYE message (step S321).This message arrives SIP ALG and handles (step S322) through IPv6 SIP Proxy X and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.RTP and the RTCP map entry set up before the deletion.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP BYE forwards is gone out, arrive IPv4 sip user terminal Y ' through step S323 and step S324.
IPv4 sip user terminal Y ' receives the other side's BYE message, sends IPv4 200 OK message (step S325), and this message arrives SIPALG and handles (step S326) through IPv4 SIP Proxy Y and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP 200 OK forwards are gone out, arrive IPv6 sip user terminal X ' through step S327 and step S328.Both sides' voice call stops.
Another kind of network topology environment comprises an IPv6 dns server DNS_A as shown in Figure 4 in the IPv6 network domains A.Comprise a border SIP Proxy server Y and IPv4DNS server DNS_B in the IPv4 network domains B, IPv4 sip user terminal Y ' is registered on the IPv4 SIP Proxy server Y in this territory, and IPv6 sip user terminal X ' also is registered on the IPv4 SIPProxy server Y in the IPv4 network domains B.The NAT-PT system is between IPv6 network domains A and IPv4 network domains B.
In conjunction with the network topology environment of Fig. 4, IPv6 sip user terminal X ' in the IPv6 network domains A and the domain name mapping between the IPv4 SIP Proxy server Y in the IPv4 network domains B are assisted to realize by DNSALG and NAT-PT system.The embodiment of the implementation method of the SIP ALG of a kind of IPv4/IPv6 of being used for network address translation of the present invention and protocol translation is described below in conjunction with the accompanying drawings:
Fig. 5 is according to a kind of concrete enforcement of the present invention, describe in a kind of implementation method of the SIP ALG that is used for IPv4/IPv6 network address translation and protocol translation, an embodiment according to Fig. 4 network topology structure, when the IPv4 SIP Proxy server Y of IPv6 sip user terminal X ' in IPv4 network domains B registers, through the handling process of SIP ALG.
At first, IPv6 sip user terminal X ' sends login request message (REGISTER) to IPv4 SIP Proxy Y (step S501), and DNS ALG assists to finish the IP address of resolving IPv4 SIP ProxyY domain name.This REGISTER message arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: translation SIP head relevant field, and set up the map entry of an IPv4 SIP Proxy Y to IPv6 sip user terminal X ', purpose is the initiatively IPv6 sip user terminal X ' request of making a call in IPv6 network domains A of IPv4 sip user terminal that can make in the IPv4 network domains B.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, SIP ALG forwards amended IPv4 SIPREGISTER bag, arrives IPv4 SIP Proxy server Y through step S502.After IPv4 SIP Proxy server Y received REGISTER message, register requirement was accepted in decision, then sends IPv4 SIP 200 OK message (step S503), and this message arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP 200 OK forwards are gone out (step S504), this message arrives IPv6 sip user terminal X '.IPv6 sip user terminal X ' finishes to the IPv4 SIP Proxy server Y registration in the IPv4 network domains B.
Fig. 6 is according to a kind of concrete enforcement of the present invention, describe in a kind of implementation method of the SIP ALG that is used for IPv4/IPv6 network address translation and protocol translation, an embodiment according to Fig. 4 network topology structure, when IPv6 sip user terminal X ' initiatively makes a call request, through the handling process of SIP ALG.
At first, caller IPv6 sip user terminal X ' sends communication request message (INVITE) to IPv4SIP Proxy Y (step S601), and DNS ALG assists to finish the IP address of resolving IPv4 SIP Proxy Y domain name.This INVITE arrives SIPALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: translation SIP head relevant field.Then translate " o=", " c=" and " m=" field in the SDP bag, set up RTP and the RTCP passage map entry of IPv4 sip user terminal Y ' to IPv6 sip user terminal X ' according to the IP address and the port information of " c=" and " m=" field.Because SDP bag is through after revising, variation has taken place in length, so, need to revise the value of " Content-Length " field in the SIP header information.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, SIP ALG forwards amended IPv4 SIP INVITE bag, arrives IPv4 sip user terminal Y ' through step S602 and step S603.
After IPv4 sip user terminal Y ' receives INVITE, send IPv4 Ringing message (step S604), this message arrives SIP ALG and handles (step S605) through IPv4 SIP Proxy Y and NAT-PT system.When SIP ALG receives this bag, do following work: judge whether this bag sends to IPv6 sip user terminal X ', if not, the bag of structure refusal then, if then translate the relevant field of SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP Ringing message bag is forwarded, arrive IPv6 sip user terminal X ' through step S606.
After IPv4 sip user terminal Y ' receives INVITE, decision call accepted request, then send IPv4 SIP 200 OK message (step S607), this message arrives SIP ALG and handles (step S608) through IPv4 SIP Proxy Y and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then translate " o=", " c=" and " m=" field in the SDP bag, the IPv4 address translation in the field is become the IPv6 address, port information is constant.Because SDP bag is through after revising, variation has taken place in length, at this moment needs to revise the value of " Content-Length " of SIP head.Then, amended IPv6 SIP 200 OK forwards are gone out, arrive IPv6 sip user terminal X ' through step S609.
After IPv6 sip user terminal X ' receives SIP 200 OK message, send IPv6 SIP ACK message (step S610), this message arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4SIP ACK forwards is gone out, arrive IPv4 sip user terminal Y ' through step S611 and step S612.
Behind the three-way handshake through top sip message, both sides' SIP session is set up and is finished, beginning both sides' RTP communication.After IPv6 RTP message bag arrives the NAT-PT system (step S613), not needing to deliver to SIP ALG handles, directly carrying out normal IPv6 udp protocol by the NAT-PT system handles to the translation of IPv4 udp protocol, message after translation is handled is IPv4 RTP message, is sent to IPv4 sip user terminal Y ' (step S614).After IPv4 RTP message bag arrives the NAT-PT system (step S615), because the map entry that need this moment is set up in the process that the SIP session is set up, so can normally carrying out the IPv4 udp protocol by the NAT-PT system, IPv4 RTP message handles to the translation of IPv6 udp protocol, message after translation is handled is IPv6RTP message, is sent to IPv6 sip user terminal X ' (step S616).Like this, IPv6 sip user terminal X ' and IPv4 sip user terminal Y ' just can hear mutual voice messaging.
Behind IPv6 sip user terminal X ' and IPv4 sip user terminal Y ' end of conversation, suppose the first on-hook of IPv4 sip user terminal Y ', send IPv4 BYE message (step S617).This message arrives SIP ALG and handles (step S618) through IPv4 SIP ProxyY and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.RTP and the RTCP map entry set up before the deletion.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP BYE forwards is gone out, arrive IPv6SIP user terminal X ' through step S619.
IPv6 sip user terminal X ' receives the other side's BYE message, sends IPv6 200 OK message (step S620), and this message arrives SIP ALG and handles through the NAT-PT system.When SIPALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4SIP 200 OK forwards are gone out, arrive IPv4 sip user terminal Y ' through step S621 and step S622.Both sides' voice call stops.
Fig. 7 is according to a kind of concrete enforcement of the present invention, describe in a kind of implementation method of the SIP ALG that is used for IPv4/IPv6 network address translation and protocol translation, according to an embodiment of Fig. 4 network topology structure, the flow process of the SIP call treatment when IPv4 sip user terminal Y ' at first makes a call request.
At first, caller IPv4 sip user terminal Y ' sends communication request message (INVITE) to IPv4SIP Proxy Y (step S701).Then, IPv4 SIP Proxy Y transmits INVITE to IPv6SIP user terminal X ', and must pass through the NAT-PT system this moment, arrives SIP ALG and handles (step S702).When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then translate " o=", " c=" and " m=" field in the SDP bag, the IPv4 address translation in the field is become the IPv6 address, port information is constant.Because SDP bag is through after revising, variation has taken place in length, so, need to revise the value of " Content-Length " field of SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP INVITE bag is forwarded, arrive IPv6 sip user terminal X ' through step S703.
After IPv6 sip user terminal X ' receives INVITE, send IPv6 Ringing message (step S704), this message arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP Ringing message bag is forwarded, arrive IPv4 sip user terminal Y ' through step S705 and step S706.
After IPv6 sip user terminal X ' received INVITE, IPv6 SIP 200 OK message (step S707) were then sent in decision call accepted request, and this message arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then translate " o=", " c=" and " m=" field in the SDP bag, set up IPv4 sip user terminal Y ' to the RTP of IPv6 sip user terminal X ' and the map entry of RTCP passage according to the IP address and the port information of " c=" and " m=" field.Because SDP bag is through after revising, variation has taken place in length, at this moment needs to revise the value of " Content-Length " field of SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP 200 OK forwards are gone out, arrive IPv4SIP user terminal Y ' through step S708 and step S709.
After IPv4 sip user terminal Y ' receives SIP 200 OK message, send IPv4 SIP ACK message (step S710), this message arrives SIP ALG and handles (step S711) through IPv4 SIP Proxy Y and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP ACK forwards is gone out, arrive IPv6 sip user terminal X ' through step S712.
Behind the three-way handshake through top sip message, both sides' SIP session is set up and is finished, beginning both sides' RTP communication.After IPv4 RTP message bag arrives the NAT-PT system (step S713), because the map entry that need this moment is set up in the process by SIP session foundation, so can carrying out IPv4 udp protocol normally by the NAT-PT system, IPv4RTP message handles to the translation of IPv6 udp protocol, message after translation is handled is IPv6 RTP message, is sent to IPv6 sip user terminal X ' (step S714).After IPv6 RTP message bag arrives the NAT-PT system (step S715), not needing to deliver to SIP ALG handles, directly carry out normally the IPv6UDP agreement to the translation processing of IPv4 udp protocol by the NAT-PT system, message after translation is handled is IPv4 RTP message, is sent to IPv4 sip user terminal Y ' (step S716).Like this, IPv6 sip user terminal X ' and IPv4 sip user terminal Y ' just can hear mutual voice messaging.
Behind IPv6 sip user terminal X ' and IPv4 sip user terminal Y ' end of conversation, suppose the first on-hook of IPv6 sip user terminal X ', send IPv6 SIP BYE message (step S717).This message arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.RTP and the RTCP map entry set up before the deletion.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP BYE forwards is gone out, arrive IPv4 sip user terminal Y ' through step S718 and step S719.
IPv4 sip user terminal Y ' receives the other side's BYE message, sends IPv4 200 OK message (step S720), and this message arrives SIPALG and handles (step S721) through IPv4 SIP Proxy Y and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP 200 OK forwards are gone out, arrive IPv6 sip user terminal X ' through step S722.Both sides' voice call stops.
Another kind of network topology environment comprises a border IPv6SIP Proxy server X and an IPv6 dns server DNS_A as shown in Figure 8 in the IPv6 network domains A.Comprise an IPv4 dns server DNS_B in the IPv4 network domains B.IPv6 sip user terminal X ' is registered on the IPv6 SIP Proxy server X in this territory, and IPv4 sip user terminal Y ' also is registered on the IPv6 SIP Proxy server X in the IPv6 network domains A.The NAT-PT system is between IPv6 network domains A and IPv4 network domains B.
In conjunction with the network topology environment of Fig. 8, IPv4 sip user terminal Y ' in the IPv4 network domains B and the domain name mapping between the IPv6 SIP Proxy server X in the IPv6 network domains A are assisted to realize by DNSALG and NAT-PT system.In addition, in order to support IPv4SIP user terminal Y ' in the IPv4 network domains B, need in the NAT-PT system, the static mappings clauses and subclauses that the IPv4 address is arrived in an IPv6 address be set for IPv6 SIP Proxy server X to initiatively making a call request of IPv6 sip user terminal X '.The embodiment of the implementation method of the SIP ALG of a kind of IPv4/IPv6 of being used for network address translation of the present invention and protocol translation is described below in conjunction with the accompanying drawings:
Fig. 9 is according to a kind of concrete enforcement of the present invention, describe in a kind of implementation method of the SIP ALG that is used for IPv4/IPv6 network address translation and protocol translation, an embodiment according to Fig. 8 network topology structure, when the IPv6 SIP Proxy server X of IPv4 sip user terminal Y ' in IPv6 network domains A registers, through the handling process of SIP ALG.
At first, IPv4 sip user terminal Y ' sends login request message (REGISTER) to IPv6SIP Proxy X (step S901), and DNS ALG assists to finish the IP address of resolving IPv6 SIP Proxy X domain name.This REGISTER message arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate the UDP head verification and.At last, SIP ALG forwards amended IPv6 SIPREGISTER bag, arrives IPv6 SIP Proxy server X through step S902.After IPv6 SIP Proxy server X received REGISTER message, register requirement was accepted in decision, then sends IPv6 SIP 200 OK message (step S903), and this message arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP 200 OK forwards are gone out (step S904), this message arrives IPv4 sip user terminal Y '.IPv4 sip user terminal Y ' finishes to the IPv6 SIP Proxy server X registration in the IPv6 network domains A.
Figure 10 is according to a kind of concrete enforcement of the present invention, describe in a kind of implementation method of the SIP ALG that is used for IPv4/IPv6 network address translation and protocol translation, an embodiment according to Fig. 8 network topology structure, when IPv6 sip user terminal X ' at first makes a call request, through the handling process of SIPALG.
At first, caller IPv6 sip user terminal X ' sends communication request message (INVITE) to IPv6SIP Proxy X (step S1001).Then, IPv6 SIP Proxy X transmits INVITE to IPv4 sip user terminal Y ', and must pass through the NAT-PT system this moment, arrives SIP ALG and handles (step S1002).When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then translate " o=", " c=" and " m=" field in the SDP bag, set up RTP and the RTCP passage map entry of IPv4 sip user terminal Y ' to IPv6 sip user terminal X ' according to the IP address and the port information of " c=" and " m=" field.Because SDP bag is through after revising, variation has taken place in length, so, need to revise the value of " Content-Length " field in the SIP header information.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, SIP ALG forwards amended IPv4 SIP INVITE bag, arrives IPv4 sip user terminal Y ' through step S1003.
After IPv4 sip user terminal Y ' receives INVITE, send IPv4 Ringing message (step S1004), this message arrives SIP ALG and handles through the NAT-PT system.When SIPALG receives this bag, do following work: judge whether this bag sends to IPv6 SIP Proxy X, if not, the bag of structure refusal then, if then translate the relevant field of SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP Ringing message bag is forwarded, arrive IPv6 sip user terminal X ' through step S1005 and step S1006.
After IPv4 sip user terminal Y ' received INVITE, IPv4 SIP 200 OK message (step S1007) were then sent in decision call accepted request, and this message arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then translate " o=", " c=" and " m=" field in the SDP bag, the IPv4 address translation in the field is become the IPv6 address, port information is constant.Because the SDP bag is through after revising, variation has taken place in length, at this moment needs to revise the value of Content-Length.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP 200 OK forwards are gone out, arrive IPv6 sip user terminal X ' through step S1008 and step S1009.
After IPv6 sip user terminal X ' receives SIP 200 OK message, send IPv6 SIP ACK message (step S1010), this message arrives SIP ALG and handles (step S1011) through IPv6 SIP Proxy X and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP ACK forwards is gone out, arrive IPv4 sip user terminal Y ' through step S1012.
Behind the three-way handshake through top sip message, both sides' SIP session is set up and is finished, beginning both sides' RTP communication.After IPv6 RTP message bag arrives the NAT-PT system (step S1013), not needing to deliver to SIP ALG handles, directly carry out normally the IPv6 udp protocol to the translation processing of IPv4 udp protocol by the NAT-PT system, message after translation is handled is IPv4 RTP message, is sent to IPv4 sip user terminal Y ' (step S1014).After IPv4 RTP message bag arrives the NAT-PT system (step S1015), because the map entry that need this moment is set up in the process that the SIP session is set up, so IPv4 RTP message can by the NAT-PT system normally the IPv4UDP agreement handle to the translation of IPv6 udp protocol, message after translation is handled is IPv6 RTP message, is sent to IPv6 sip user terminal X ' (step S1016).Like this, IPv6 sip user terminal X ' and IPv4 sip user terminal Y ' just can hear mutual voice messaging.
Behind IPv6 sip user terminal X ' and IPv4SIP user terminal Y ' end of conversation, suppose the first on-hook of IPv4 sip user terminal Y ', send IPv4 BYE message (step S1017).This message arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.RTP and the RTCP map entry set up before the deletion.Then, recomputate the UDP head verification and.At last, amended IPv6 SIPBYE forwards is gone out, arrive IPv6 sip user terminal X ' through step S1018 and step S1019.
IPv6 sip user terminal X ' receives the other side's BYE message, sends IPv6 200 OK message (step S1020), and this message arrives SIPALG and handles (step S1021) through IPv6 SIP Proxy X and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP 200 OK forwards are gone out, arrive IPv4 sip user terminal Y ' through step S1022.Both sides' voice call stops.
Figure 11 is according to a kind of concrete enforcement of the present invention, the flow process of the SIP call treatment when at first making a call request according to an example I Pv4 sip user terminal Y ' of Fig. 8 network topology structure is described in a kind of implementation method of the SIP ALG that is used for IPv4/IPv6 network address translation and protocol translation.
At first, caller IPv4 sip user terminal Y ' sends communication request message (INVITE) to IPv6SIP Proxy X (step S1101), and DNS ALG assists to finish the IPv4 address of resolving IPv6 SIP Proxy X domain name.This INVITE arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then translate " o=", " c=" and " m=" field in the SDP bag, the IPv4 address translation in the field is become the IPv6 address, port information is constant.Because SDP bag is through after revising, variation has taken place in length, so, need to revise the value of " Content-Length " field of SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP INVITE bag is forwarded, arrive IPv6 sip user terminal X ' through step S1102 and step S1103.
After IPv6 sip user terminal X ' receives INVITE, send IPv6 Ringing message (step S1104), this message arrives SIPALG and handles (step S1105) through IPv6 SIP Proxy X and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP Ringing message bag is forwarded, arrive IPv4 sip user terminal Y ' through step S1106.
After IPv6 sip user terminal X ' receives INVITE, decision call accepted request, then send IPv6 SIP 200 OK message (step S1107), this message arrives SIP ALG and handles (step S1108) through IPv6 SIP Proxy X and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then translate " o=", " c=" and " m=" field in the SDP bag, set up RTP and the RTCP passage map entry of IPv4 sip user terminal Y ' to IPv6 sip user terminal X ' according to the IP address and the port information of " c=" and " m=" field.Because SDP bag is through after revising, variation has taken place in length, at this moment needs to revise the value of " Content-Length " field of SIP head.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP 200 OK forwards are gone out, arrive IPv4 sip user terminal Y ' through step S1109.
After IPv4 sip user terminal Y ' receives SIP 200 OK message, send IPv4 SIP ACK message (step S1110), this message arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP ACK forwards is gone out, arrive IPv6 sip user terminal X ' through step S1111 and step S1112.
Behind the three-way handshake through top sip message, both sides' SIP session is set up and is finished, beginning both sides' RTP communication.After IPv4 RTP message bag arrives the NAT-PT system (step S1113), because the map entry that need this moment is set up in the process by SIP session foundation, so IPv4RTP message can by the NAT-PT system normally the IPv4 udp protocol handle to the translation of IPv6 udp protocol, message after translation is handled is IPv6 RTP message, is sent to IPv6 sip user terminal X ' (step S1114).After IPv6 RTP message bag arrives the NAT-PT system (step S1115), not needing to deliver to SIP ALG handles, directly by the NAT-PT system normally the IPv6 udp protocol to the translation processing of IPv4 udp protocol, message after translation is handled is IPv4 RTP message, is sent to IPv4 sip user terminal Y ' (step S1116).Like this, IPv6 sip user terminal X ' and IPv4 sip user terminal Y ' just can hear mutual voice messaging.
Behind IPv6 sip user terminal X ' and IPv4 sip user terminal Y ' end of conversation, suppose the first on-hook of IPv6 sip user terminal X ', send IPv6 SIP BYE message (step S1117).This message arrives SIP ALG and handles (step S1118) through IPv6 SIP Proxy X and NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.RTP and the RTCP map entry set up before the deletion.Then, recomputate IPv4 bag header check and and the verification of UDP head and.At last, amended IPv4 SIP BYE forwards is gone out, arrive IPv4 sip user terminal Y ' through step S1119.
IPv4 sip user terminal Y ' receives the other side's BYE message, sends IPv4 200 OK message (step S1120), and this message arrives SIP ALG and handles through the NAT-PT system.When SIP ALG receives this bag, do following work: the relevant field of translation SIP head.Then, recomputate the UDP head verification and.At last, amended IPv6 SIP 200 OK forwards are gone out, arrive IPv6 sip user terminal X ' through step S1121 and step S1122.Both sides' voice call stops.
The above-mentioned of the present invention concrete technical application scheme that provides has realized purpose of the present invention.Realized that IPv4 sip user terminal in the IPv4 territory visits the IPv6 sip user terminal in the IPv6 territory on one's own initiative, also realized that IPv6 sip user terminal in the IPv6 territory visits the IPv4SIP user terminal in the IPv4 territory on one's own initiative simultaneously.
Aforesaid embodiment is not used in restriction the present invention as just for example.Content of the present invention can easily be applied in the device and environment of other type.Description of the invention is the illustration formula, is not the scope that is used for limiting claim.Multiple choices, modifications and variations are conspicuous for a person skilled in the art.

Claims (5)

1. implementation method that is used for the SIP ALG of network address translation and protocol translation comprises:
(1) at first be the map addresses clauses and subclauses of the static state of border sip proxy server distribution in the IPv6 territory in the address mapping table of NAT-PT system, the content of these clauses and subclauses is: the IPv6 address of the border sip proxy server in the IPv6 territory and the global I Pv4 address of its correspondence;
(2) the NAT-PT system discerns the packet of Session Initiation Protocol according to purpose information or port information, packet is sent on the SIP ALG handle;
(3) the SIP ALG is handled the packet of Session Initiation Protocol, specifically comprises:
(21) the IPv6SIP protocol package is to the conversion process of IPv4SIP protocol package;
(22) the IPv4SIP protocol package is to the conversion process of IPv6SIP protocol package;
Wherein, described IPv6SIP protocol package comprises to the conversion process of IPv4SIP protocol package:
(41) treatment S IP protocol headers field: the header fields to Session Initiation Protocol carries out conversion process, comprise Contact, Via, Record-Route, Route, Request-URI, From, To and Content-Length field, the IPv6 address of SIP header fields and port information are converted to IPv4 address and port information, set up the map entry of IPv4 network to the IPv6 network;
(42) content of treatment S DP agreement: " c=" field and " m=" field according to the SDP bag judge whether the map entry of RTP is set up, if do not set up, then set up map entry for RTP and RTCP, then, the protocol type of " c=" field is changed into IP4 by IP6, is the IPv6 address transition IPv4 address of map entry, and the port information of " m=" field is converted to the port information of the IPv4 of map entry, and the address part of " o=" field is changed;
(43) through the processing of step (42), the size of SDP content has changed, and needs to revise the Content-Length field of Session Initiation Protocol head;
(44) to packet recomputate IPv4 head and UDP head verification and, then, execution in step (4);
(4) last, the SIP packet after the SIP ALG will be handled sends.
2. the implementation method that is used for the SIP ALG of network address translation and protocol translation according to claim 1, it is characterized in that, step (22) IPv4SIP protocol package during step (3) SIP ALG is handled the packet of Session Initiation Protocol comprises to the conversion process of IPv6SIP protocol package:
(51) treatment S IP protocol headers field: the header fields to Session Initiation Protocol carries out conversion process, comprise Contact, Via, Record-Route, Route, Request-URI, From, To, Content-Length field, the IPv4 address of SIP header fields and port information are converted to IPv6 address and port information, the query mappings table, the map entry that taking-up inquires carries out the conversion process of relevant field;
(52) " o=", " c=" and " m=" field of the content of treatment S DP agreement: treatment S DP bag, the protocol type of " c=" and " o=" field field is being changed into IP6 by IP4, is the IPv4 address transition IPv6 address, and the port information of " m=" field is constant;
(53) through the processing of step (52), the size of SDP content has changed, and needs to revise the Content-Length field of SIP head;
(54) to the verification of packet UDP head again and, then, execution in step (4).
3. the implementation method that is used for the SIP ALG of network address translation and protocol translation according to claim 1, it is characterized in that, a kind of network topology structure that is used for the SIP ALG of network address translation and protocol translation is: comprise a border SIPProxy server and IPv6DNS server in the IPv6 network domains, the IPv6SIP user terminal is registered to the IPv6 in this territory
On the SIP Proxy server, comprise a border SIP Proxy server and IPv4DNS server in the IPv4 network domains, the IPv4SIP user terminal is registered on the IPv4SIP Proxy server in this territory, comprising:
When (61) the IPv6SIP user terminal initiatively made a call request, the SIP ALG needed SIP relevant field and the SDP relevant field in the treatment S IP INVITE, and sets up IPv4
The sip user terminal is to the RTP and the RTCP map entry of IPv6SIP user terminal, the SIP ALG needs the SIP relevant field of treatments B YE message, and deletion IPv4SIP user terminal is to the RTP and the RTCP map entry of IPv6SIP user terminal, the SIP ALG needs SIP relevant field and SDP relevant field in the processing messages to other sip messages, and the packet of rtp streaming is handled by the NAT-PT system;
When (62) IPv4 sip user terminal initiatively makes a call request, the SIP ALG needs SIP relevant field and the SDP relevant field in the treatment S IP 200 OK message, and set up RTP and the RTCP map entry of IPv4SIP user terminal to IPv6 sip user terminal, the SIP ALG needs the SIP relevant field of treatments B YE message, and deletion IPv4 sip user terminal is to the RTP and the RTCP map entry of IPv6 sip user terminal, the SIP ALG needs SIP relevant field and SDP relevant field in the processing messages to other sip messages, and the packet of rtp streaming is handled by the NAT-PT system.
4. the implementation method that is used for the SIP ALG of network address translation and protocol translation according to claim 1, it is characterized in that, the another kind of network topology structure that is used for the SIP ALG of network address translation and protocol translation is: do not have SIP Proxy server in the IPv6 network domains, on the IPv4SIP Proxy server of IPv6 sip user endpoint registration in the IPv4 territory, comprise a border SIP Proxy server in the IPv4 network domains, on the IPv4SIP Proxy server of IPv4 sip user endpoint registration in this territory, comprising:
(71) IPv6 sip user terminal is when IPv4 SIP Proxy server registration, the SIP ALG needs the SIP relevant field of treatment S IP REGISTER message, and set up the map entry of IPv4SIPProxy, other a sip message treatment S IP relevant field to IPv6 sip user terminal;
When (72) IPv6 sip user terminal initiatively makes a call request, the SIP ALG needs SIP relevant field and the SDP relevant field in the treatment S IP INVITE, and set up RTP and the RTCP map entry of IPv4SIP user terminal to IPv6 sip user terminal, the SIP ALG needs the SIP relevant field of treatments B YE message, and deletion IPv4 sip user terminal is to the RTP and the RTCP map entry of IPv6 sip user terminal, the SIP ALG needs SIP relevant field and SDP relevant field in the processing messages to other sip messages, and the packet of rtp streaming is handled by the NAT-PT system;
When (73) IPv4 sip user terminal initiatively makes a call request, the SIP ALG needs SIP relevant field and the SDP relevant field in the treatment S IP 200 OK message, and set up RTP and the RTCP map entry of IPv4SIP user terminal to the IPv6SIP user terminal, the SIP ALG needs the SIP relevant field of treatments B YE message, and deletion IPv4 sip user terminal is to the RTP and the RTCP map entry of IPv6 sip user terminal, the SIP ALG needs SIP relevant field and SDP relevant field in the processing messages to other sip messages, and the packet of rtp streaming is handled by the NAT-PT system.
5. the implementation method that is used for the SIP ALG of network address translation and protocol translation according to claim 1, it is characterized in that, the another kind of network topology structure that is used for the SIP ALG of network address translation and protocol translation is: comprise a border SIPProxy server in the IPv6 network domains, the IPv6SIP user terminal is registered on the IPv6 SIP Proxy server in this territory, there is not SIP Proxy server in the IPv4 network domains, on the IPv6 SIP Proxy server of IPv4 sip user endpoint registration in the IPv6 territory, comprising:
(81) IPv4 sip user terminal is when IPv6 SIP Proxy server registration, and the SIP ALG needs the SIP relevant field of treatment S IP message;
When (82) IPv6 sip user terminal initiatively makes a call request, the SIP ALG needs SIP relevant field and the SDP relevant field in the treatment S IP INVITE, and set up RTP and the RTCP map entry of IPv4SIP user terminal to IPv6 sip user terminal, the SIP ALG needs the SIP relevant field of treatments B YE message, and deletion IPv4 sip user terminal is to the RTP and the RTCP map entry of IPv6 sip user terminal, the SIP ALG needs SIP relevant field and SDP relevant field in the processing messages to other sip messages, and the packet of rtp streaming is handled by the NAT-PT system;
When (83) IPv4 sip user terminal initiatively makes a call request, the SIP ALG needs SIP relevant field and the SDP relevant field in the treatment S IP 200 OK message, and set up RTP and the RTCP map entry of IPv4SIP user terminal to IPv6 sip user terminal, the SIP ALG needs the SIP relevant field of treatments B YE message, and deletion IPv4 sip user terminal is to the RTP and the RTCP map entry of IPv6 sip user terminal, the SIP ALG needs SIP relevant field and SDP relevant field in the processing messages to other sip messages, and the packet of rtp streaming is handled by the NAT-PT system.
CNB2005100701002A 2005-05-10 2005-05-10 Method for applying layer gateway used for network address conversion and in protocol translation Expired - Fee Related CN100493049C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100701002A CN100493049C (en) 2005-05-10 2005-05-10 Method for applying layer gateway used for network address conversion and in protocol translation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100701002A CN100493049C (en) 2005-05-10 2005-05-10 Method for applying layer gateway used for network address conversion and in protocol translation

Publications (2)

Publication Number Publication Date
CN1674565A CN1674565A (en) 2005-09-28
CN100493049C true CN100493049C (en) 2009-05-27

Family

ID=35046834

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100701002A Expired - Fee Related CN100493049C (en) 2005-05-10 2005-05-10 Method for applying layer gateway used for network address conversion and in protocol translation

Country Status (1)

Country Link
CN (1) CN100493049C (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100525311C (en) * 2006-03-10 2009-08-05 中国科学院计算技术研究所 Method for preventing NAT-PT equipment from being attacked
CN101136910B (en) * 2006-08-30 2010-09-29 中国电信股份有限公司 Network address and protocol translating equipment and application layer gateway equipment
CN101179468B (en) * 2006-11-10 2011-06-22 中兴通讯股份有限公司 Method for communication between isomerized network SIP terminal and H.323 terminal
CN101197820B (en) * 2006-12-05 2011-04-20 中兴通讯股份有限公司 Ipv6 SIP terminal and IPv4 SIP terminal communication method
CN101257435B (en) * 2007-02-28 2011-08-17 上海亿人通信终端有限公司 Implementing method of SIP application-level gateways based on NAT-PT
CN101184065B (en) * 2007-12-05 2010-06-02 中兴通讯股份有限公司 Method and equipment for implementing voice communication between IPv6 and IPv4 network terminal
CN101237401B (en) * 2008-02-26 2010-06-02 中兴通讯股份有限公司 Data connection establishing method and router
DE102008048872A1 (en) * 2008-09-25 2010-04-08 Siemens Ag Österreich Method and device for bidirectional address translation in SIP-controlled data streams between IPv4 and IPv6 data terminals
CN101808143B (en) * 2010-03-12 2013-06-05 中国电力科学研究院 Method for access of IPv4 power terminal into IPv6 power data communication network
US8837474B2 (en) 2011-12-19 2014-09-16 Qualcomm Incorporated Apparatus and methods for efficient network address translation and application level gateway processing
CN103441933A (en) * 2013-07-22 2013-12-11 汉柏科技有限公司 Method for achieving communication between IPV4 device and IPV6 device
CN110138748B (en) * 2019-04-23 2020-10-23 北京交通大学 Network convergence communication method, gateway equipment and system
CN112825518A (en) * 2019-11-21 2021-05-21 湖北省电力勘测设计院有限公司 Application protocol screening and matching method based on content filtering
CN116566943A (en) * 2023-07-12 2023-08-08 明阳时创(北京)科技有限公司 Lightweight direct-conversion relay method and system for audio and video streams

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002009387A1 (en) * 2000-07-21 2002-01-31 Nokia Corporation Sip sessions between ipv4 and ipv6 clients and sip based call setup in 3gpp ip multimedia subsystem with nat in place
CN1423201A (en) * 2001-12-07 2003-06-11 株式会社日立制作所 Address changing device, message treatment method and apparatus
US20030193965A1 (en) * 1996-07-04 2003-10-16 Hitachi, Ltd. Packet communication method and apparatus and a recording medium storing a packet communication program
CN1574835A (en) * 2003-06-06 2005-02-02 日立通讯技术株式会社 Ip address translator and packet transfer apparatus
CN1595933A (en) * 2003-09-09 2005-03-16 株式会社日立制作所 Session control system, communication terminal, servers and terminals

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030193965A1 (en) * 1996-07-04 2003-10-16 Hitachi, Ltd. Packet communication method and apparatus and a recording medium storing a packet communication program
WO2002009387A1 (en) * 2000-07-21 2002-01-31 Nokia Corporation Sip sessions between ipv4 and ipv6 clients and sip based call setup in 3gpp ip multimedia subsystem with nat in place
CN1423201A (en) * 2001-12-07 2003-06-11 株式会社日立制作所 Address changing device, message treatment method and apparatus
CN1574835A (en) * 2003-06-06 2005-02-02 日立通讯技术株式会社 Ip address translator and packet transfer apparatus
CN1595933A (en) * 2003-09-09 2005-03-16 株式会社日立制作所 Session control system, communication terminal, servers and terminals

Also Published As

Publication number Publication date
CN1674565A (en) 2005-09-28

Similar Documents

Publication Publication Date Title
CN100493049C (en) Method for applying layer gateway used for network address conversion and in protocol translation
CN100527750C (en) Communications protocols operable through network address translation (nat) type devices
US20050185672A1 (en) IPv6/IPv4 translator
US6985479B2 (en) Method and apparatus for processing internet protocol transmissions
Camarillo et al. Grouping of media lines in the session description protocol (SDP)
JP4660624B2 (en) IP network interconnection system, interconnection method and SIP message routing method using different IP address systems
CN101552848B (en) Session method and apparatus based on session initiation protocol
US8090858B2 (en) Systems and methods for encapsulation based session initiation protocol through network address translation
US20050117605A1 (en) Network address and port translation gateway with real-time media channel management
AU2005201075B2 (en) Apparatus and method for voice processing of voice over internet protocol (VOIP)
US20050050211A1 (en) Method and apparatus to manage network addresses
US20040240399A1 (en) Transcoding arrangement in a session initiation
CN1947401A (en) System and method for establishing a session initiation protocol communication session with a mobile terminal
WO2002003217A1 (en) System, method, and computer program product for resolving addressing in a network including a network address translator
JP5051728B2 (en) Method and system for transmitting data between nodes connected to different IP environments by assigning a fake address
EP1751948A2 (en) System and method for pushing content to a terminal utilizing a network-initiated data service technique
EP1575245A1 (en) Method and apparatus to manage network addresses for private voice communications
CN102413147A (en) Agent server
WO2007086812A1 (en) Methods for transmitting and receiving data and communication devices
CN101175043B (en) System and method for supporting IPv6 terminal access to IPv4 core net
CN103139209A (en) Medium code stream obtaining method, unilateral self-address fixing (UNISAF) server and soft-switch communication system
JP4022759B2 (en) Multimedia terminal, proxy server, router, and communication control method in multimedia communication system
KR100418397B1 (en) softswitch for interfacing between different protocol
CN101335739A (en) Implementing method for H248 protocol to get through NAT device
CN103905669B (en) A kind of method for interchanging data, system and MGC

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090527

Termination date: 20200510

CF01 Termination of patent right due to non-payment of annual fee