IPv6-IPv4 Translator Wechen
IPv6-IPv4 Translator Wechen
IPv6-IPv4 Translator Wechen
Whai-En Chen
Research Assistant Professor
Department of Computer Science and Information Engineering
National Chiao Tung University
[email protected]
LAB 117 & VoIP LAB
Outline
Dual Stack
Reduce the cost invested in transition by running both
IPv4/IPv6 protocols on the same machine .
Tunneling
Reduce the cost in wiring by re-using current IPv4 routing
infrastructures as a virtual link.
Translation
Allow IPv6 realm to access the rich contents already developed
on IPv4 applications
LAB 117 & VoIP LAB
Dual-stack
應用層
•Dual Stack表示同時裝有IPv4與IPv6兩個通訊協定
堆疊。
•當兩台機器通訊時,可以使用IPv4通訊,或是IPv6
傳輸層 (TCP/UDP) 通訊。
•當IPv6已經廣泛地被使用時,就可以移除IPv4通訊
協定,而全面使用IPv6協定。
IPv4 IPv6
網路介面層
LAB 117 & VoIP LAB
Applications
TCP/UDP Routing protocols
IPV4 IPV6 TCP/UDP
Device Driver IPV4 IPV6
Device Driver
V6
V6
V4/V6
V4/V6 network
network network
network
Host Router
V4
V4
network
network
如果所有的機器都是Dual Stack,還需要其他的轉換機制嗎?
LAB 117 & VoIP LAB
6to4 6to4
Router1 Router2
IPv6 E0 IPv4 E0 IPv6
Network Network
131.243.129.44 140.110.199.250
Network prefix: Network prefix:
2002:83F3:812C::/48 2002:8C6E:C7FA::/48
= =
router2#
interface Ethernet0
6to4 Tunnel: ip address 140.110.199.250 255.255.255.0
ipv6 address 2002:8C6E:C7FA:1::/64 eui-64
– Is an automatic tunnel method interface Tunnel0
– Gives a prefix to the attached IPv6 network no ip address
ipv6 unnumbered Ethernet0
– 2002::/16 assigned to 6to4 tunnel source Ethernet0
– Requires one global IPv4 address on each site tunnel mode ipv6ip 6to4
Address Translations
Bump-In-the-Stack Bump-In-the-Application
LAB 117 & VoIP LAB
Extension Translator
Name Address
(Function
Mapper
Resolver Mapper)
Translation Middleware
LAB 117 & VoIP LAB
Introduction to NAT-PT
NATPT (Network Address Translation and Protocol
Translation)
Translate IPv6 to IPv4 headers, and vice versa.
Also includes ICMP headers
NAPTPT (NATPT with Port translation)
Network Address and Protocol Translation with Port Translation
Various IPv6 clients can utilize one IP to connect Internet
ALG (Application Layer Gateway)
ALG assists NAT to deal with upper-layer protocols
Translate Upper-layer protocols (such as: DNS, FTP)
Also called DNS_ALG and FTP ALG
LAB 117 & VoIP LAB
DNS1
3ffe:3600:1::2 DNS2
DNS
140.113.87.1
DNS
DNS-ALG
IPv6 Network
IPv4 Network
Translator
UA1
The NAT-
TheNAT
-PT translator configuration
NAT-PT translator configuration UA2
3ffe:3600:1::3 140.113.87.2
•AddressPool:
Pool:140.113.87.51-60
•Address
ua1.ipv6.nctu.edu.tw 140.113.87.51-60
•NAT-PT Prefix: 3ffe:3600:2::/96 ua2.ipv4.nctu.edu.tw
•NAT-PT Prefix: 3ffe:3600:2::/96
LAB 117 & VoIP LAB
DNS-ALG
UA1 DNS1 + DNS2 UA2
NAT-PT
DNS Query (AAAA) DNS Query (AAAA)
1.1 1.2
1.3
DNS Query (A) 1.4
DNS-ALG
UA1 DNS1 + DNS2 UA2
NAT-PT
DNS Query (A) 2.2 DNS Query (A) 2.1
2.4 2.3
DNS Query (AAAA)
2.5
DNS Response (AAAA)
IPv6
Header
IPv4 Fragment Header
Header (If Present)
Transport Layer Transport Layer
Header Header
Data Data
LAB 117 & VoIP LAB
Version 6
Traffic Class 0
Flow Label 0
Fragment Next Header [8] Res. [8] Fragment Offset [13] Res. MF
Header Identification [32]
LAB 117 & VoIP LAB
ICMPv4(Type) ICMPv6(Type)
IPv6
Header
Fragment Header IPv4
(If Present) Header
Data Data
LAB 117 & VoIP LAB
ICMPv6(Type) ICMPv4(Type)
MLD Multicast Listener Query/Report/Done Silently drop (Single Hop & Undefine)
(130/131/132)
Checksum Modification
Case Policy
Other
HTTP TELNET DNS FTP SIP Applications a
PC Hardware
LAB 117 & VoIP LAB
a
6 5
b
4
e
3 2 1
c d
LAB 117 & VoIP LAB
Development Status
Socket-layer Translator can translate most Winsock
applications using NAT-friendly protocol
FTP-ALG and SIP-ALG can translate FTP and SIP
applications respectively.
Tested Applications
NAT-friendly: Netscape (HTTP), Telnet
DNS
FTP: CuteFTP, FileZilla, SmartFTP
SIP: CCL SkinUA 0.8
LAB 117 & VoIP LAB
Item
FTP Command Successful Response
Reference
RFC-959 PORT a1,a2,a3,a4,p1,p2 200 OK
RFC-2428 EPRT |<net-prt>|<addr>|<port>| 200 OK
RFC-959 PASV 227 Entering…(a1,a2,a3,a4,p1,p2)
RFC-2428 EPSV 229 Entering…(|||<port>|)
LAB 117 & VoIP LAB
Client
OS: Windows XP SP1
FTP Client
SmartFTP IPv4 mode
SmartFTP IPv6 mode
SmartFTP IPv4 mode with SLT and FTP-ALG
Actions: Download files with size from 10KB to 2G
Server
OS: linux Fedora Core 1
FTP Server: vsftpd
LAB 117 & VoIP LAB
Size
10KB 100KB 1MB 10MB 100MB 500MB 1GB 2GB
Mode
IPv4 1 1 1 1 10 49 101 204
IPv6 1 1 1 1 10 52 105 215
SLT 1 1 1 1 11 53 108 219
LAB 117 & VoIP LAB
Transmission Delay
pure ipv6 pure ipv4 Socket-layer Translator
220
170
120
Delay (sec)
70
20
-30
File Size (Byte)
LAB 117 & VoIP LAB
16
14
12
10
Difference (sec)
IPv6-IPv4
8 SLT-IPv4
SLT-IPv6
6
0
10K 100K 1M 10M 100M 500M 1G 2G
File Size (Byte)
LAB 117 & VoIP LAB
Mechanisms Socket-layer
Manual Modification BIA BIS
Items Translator
Source Codes Required Not required Not required Not required
All socket-based All IP-based All socket-based
Applicability Modified codes
programs Programs programs
P2P Security Support Yes Yes No Yes
Translation of NAT
Yes Yes Yes Yes
friendly protocols
Support of SIP and
Yes No No Yes
FTP
SIPv6 Translator
LAB 117 & VoIP LAB
Abstract
Since Voice over IP (VoIP) phones can efficiently utilize the network and
save a lot of money for users, there are increasingly people employ
personal computers, notebooks, and PDA with VoIP Phone to communicate
with each other.
VoIP is a peer-to-peer service, and connecting through Internet requires
large number of global Internet identifiers.
Though network address translation (NAT) can help to reduce the address
requirements, NAT cannot offer incoming calls directly.
IPv6 provides large addressing space and is the best choice for VoIP
phones.
However, VoIPv6 phones should be able to communicate with existing
VoIPv4 systems.
Consequently, we will propose an VoIPv6 translator to connect VoIPv6
phones with popular Internet.
LAB 117 & VoIP LAB
3.3 200 OK
Via: SIP/2.0/UDP 140.113.87.53:5061
3.4 200 OK To: <sip:[email protected]>
Via: SIP/2.0/UDP [3ffe:3600:1::4]:5060 From:<sip:[email protected]>
To: <sip:[email protected]> Contact:<sip:1234@ 140.113.87.52:5061>
From:<sip:[email protected]>
Contact:<sip:1234@ [3ffe:3600:1::3]:5060>
SIP-ALG
UA1 NAT-PT SIPv4 Server UA2
4.2 INVITE sip:[email protected]:5061 4.1 INVITE sip:[email protected]
Via: SIP/2.0/UDP 140.113.87.40:5060 Via: SIP/2.0/UDP 140.113.87.2:5060
4.3 INVITE sip:1234@[3ffe:3600:1::3]:5060 Via: SIP/2.0/UDP 140.113.87.2:5060 Contact: <sip:[email protected]>
Via: SIP/2.0/UDP [3ffe:3600:2::140.113.87.40]:5060 Contact: <sip:[email protected]> c=IN IP4 140.113.87.2
Via: SIP/2.0/UDP 140.113.87.2:5060 c=IN IP4 140.113.87.2 m=Audio 9000 RTP/AVP 0 4 8
Contact: <sip:[email protected]> m=Audio 9000 RTP/AVP 0 4 8
c=IN IP6 3ffe:3600:2::140.113.87.2
m=Audio 9000 RTP/AVP 0 4 8
4.4 200 OK
Via: SIP/2.0/UDP [3ffe:3600:2::140.113.87.40]:5060
4.5 200 OK
Via: SIP/2.0/UDP 140.113.87.2:5060
Contact: sip:[email protected] Via: SIP/2.0/UDP 140.113.87.40:5060
Via: SIP/2.0/UDP 140.113.87.2:5060
c=IN IP6 3ffe:3600:1::3 4.6 200 OK
m=Audio 9000 RTP/AVP 0 Contact: <sip:[email protected]>
c=IN IP4 140.113.87.52 Via: SIP/2.0/UDP 140.113.87.2:5060
m=Audio 9002 RTP/AVP 0 Contact: <sip:[email protected]>
c=IN IP4 140.113.87.52
m=Audio 9002 RTP/AVP 0
SIP-ALG
UA1 NAT-PT SIPv4 Server UA2
5.1 INVITE sip:[email protected]
Via: SIP/2.0/UDP [3ffe:3600:1::3]:5060
Contact: sip:[email protected] 5.2 INVITE sip:[email protected]
Via: SIP/2.0/UDP 140.113.87.52:5061 5.3 INVITE sip:[email protected]
c=IN IP6 3ffe:3600:1::3 Via: SIP/2.0/UDP 140.113.87.40:5060
Contact: sip:[email protected]
m=Audio 9000 RTP/AVP 0 4 8 Via: SIP/2.0/UDP 140.113.87.52:5061
c=IN IP4 140.113.87.52
m=Audio 9004 RTP/AVP 0 4 8 Contact: sip:[email protected]
c=IN IP4 140.113.87.52
m=Audio 9004 RTP/AVP 0 4 8
5.4 200 OK
Via: SIP/2.0/UDP 140.113.87.40:5060
Via: SIP/2.0/UDP 140.113.87.52:5061
5.5 200 OK Contact: sip:[email protected]
Via: SIP/2.0/UDP 140.113.87.52:5061 c=IN IP4 140.113.87.2
5.6 200 OK Contact: sip:[email protected] m=Audio 9000 RTP/AVP 0
Via: SIP/2.0/UDP [3ffe:3600:1::3]:5060 c=IN IP4 140.113.87.2
Contact: sip:[email protected] m=Audio 9000 RTP/AVP 0
c=IN IP6 3ffe:3600:2::140.113.87.2
m=Audio 9000 RTP/AVP 0
v=0
o=CCL'sSIPv6UA 17045 11864 IN IP6 3ffe:3600:1:0:20c:6eff:fe1e:55da
s=SIP Call
SDP c=IN IP6 3ffe:3600:1:0:20c:6eff:fe1e:55da
t=0 0 SIP與SDP標頭中,
Signaling m=audio 29118 RTP/AVP 0 101 含有Caller的IPv6位址,
a=rtpmap:0 pcmu/8000 3ffe:3600:1:0:20c:6eff:fe1e:55da
a=rtpmap:101 telephone-event/8000
LAB 117 & VoIP LAB
v=0
o=CCL'sSIPv6UA 17045 11864 IN IP4 10.113.131.101
s=SIP Call
SDP c=IN IP4 10.113.131.101
t=0 0 SIP與SDP標頭中,
Signaling m=audio 2918 RTP/AVP 0 101 Caller經過SIP-ALG轉換的IPv4位址,
a=rtpmap:0 pcmu/8000 10.113.131.101
a=rtpmap:101 telephone-event/8000
LAB 117 & VoIP LAB
CCL Vontel
SkinUA
SIPv6 SIPv4
Analyzer Analyzer Windows
Messenger 4.7
SIPv6
Translator
PingTel 2.1.10
IP Phone
PSTN Gateways
LAB 117 & VoIP LAB
SIP/SDP Translation
LAB 117 & VoIP LAB
HTTP Test
LAB 117 & VoIP LAB
Telnet Test
LAB 117 & VoIP LAB
* 未修改SIP訊息中的From與To欄位
* 未修改SIP訊息中的From與To欄位 * 未修改SDP訊息中的o欄位
Solution : modified “From”&”To” header fields in SIP and “o” header field in SDP.
Test Results
Modified SIP and SDP header fields for SIP routing
Request-URI、Contact、Via
c、m
Success: SIP message flow is correct and RTP sessions are set
up.
CCL SkinUA, Pingtel 2.1.10, snow 200, CCL PSTN Gateway
Fail: different error message for each case
Windows Messenger 4.7 (show Error Message in Windows
Messenger but no response)
Cisco IP Phone 7940 Series (return “400 Bad Request”)
Cisco PSTN Gateway (return “400 Bad Request” and “399 Invalid
SDP Information”)
LAB 117 & VoIP LAB
Testing Results
Windows Messenger
4.7.2009
snom 200
Cisco IP Phone
7940 Series
Cisco
PSTN Gateway
LAB 117 & VoIP LAB
Conclusions
Currently, NTP SIPv6 UA can communicate with all SIPv4 UAs and
CCL PSTN gateway that are deployed in NTP VoIP platform.
However, NTP SIPv6 UA cannot communicate with CISCO PSTN
gateway, and CCL PCA (IPv6 SIP UA) cannot communicate with
CISCO PSTN gateway and Pingtel hardware-based SIP phone.
In next week, we will have more tests and find out the problems.
Then we will fixed the problems in one week.
Finally, the SIPv6 Translator can bridge the traffic between SIPv6
network and SIPv4 network (i.e., NTP VoIP platform), and we will
start to write down our contributions as a paper.
LAB 117 & VoIP LAB
Reference (1)
[1]J. Postel, "Internet Protocol" , STD 5, IETF RFC 791, Sep-01-1981.
(Standard)
[2] J. Postel, "Internet Control Message Protocol" , STD 5, IETF
RFC 792, Sep-01-1981. (Standard)
[3] S. Deering, R. Hinden, ”Internet Protocol, Version 6 (IPv6)
Specification”, IETF RFC-2460, 1998/12. (Draft Standard)
[4] A. Conta, S. Deering, "Internet Control Message Protocol
(ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification",
IETF RFC-2463, December 1998. (Draft Standard)
[5] S. Thomson, T. Narten, "IPv6 Stateless Address
Autoconfiguration", IETF RFC-2462, December 1998. (Draft
Standard)
[6] T. Narten, E. Nordmark, W. Simpson, "Neighbor Discovery for
IP Version 6 (IPv6) ", IETF RFC-2461, December 1998. (Draft
Standard)
[7]R. Draves, “Default Address Selection for Internet Protocol version
6 (IPv6)”, IETF RFC-3484, February 2003. (Proposed Standard)
[8] Nordmark, E., "Stateless IP/ICMP Translator (SIIT)", IETF
RFC-2765, February 2000. (Proposed Standard)
LAB 117 & VoIP LAB
Reference (2)
[9] G. Tsirtsis, P. Srisuresh, ”Network Address Translation - Protocol
Translation (NAT-PT)”, IETF RFC-2766, 2000/2. (Proposed
Standard)
[10] Mockapetris, P., "Domain Names - Concepts and Facilities", STD
13, IETF RFC-1034, November 1987. (Standard)
[11] Mockapetris, P., "Domain Names - Implementation and
Specification", STD 13, IETF RFC-1035, November 1987. (Standard)
[12] S. Thomson, C. Huitema, V. Ksinant, M. Souissi, "DNS Extensions
to Support IP Version 6", IETF RFC-3596, October 2003. (Draft
Standard)
[13] Srisuresh, P., Tsirtsis, G., Akkiraju, P. and A. Heffernan, "DNS
extensions to Network Address Translators (DNS_ALG)", IETF RFC-
2694, September 1999. (Informational)
[14] J. Rosenberg, H. Schulzrinne, G. Camarillo, A. Johnston, J.
Peterson, R. Sparks, M. Handley, E. Schooler, “SIP: Session
Initiation Protocol”, IETF RFC-3261, June 2002. (Proposed Standard)
[15] Handley, M. and V. Jacobson, "SDP: Session Description Protocol",
IETF RFC-2327, April 1998. (Proposed Standard)
LAB 117 & VoIP LAB
Reference (3)
[16] S. Olson, G. Camarillo, A. B. Roach, "Support for IPv6 in Session
Description Protocol (SDP)", IETF RFC-3266, June 2002. (Proposed
Standard)
[17] LibPcap網站, http://www.tcpdump.org/
[18] 6WIND公司網站, http://www.6wind.com/
[19] CISCO- Implementing NAT-PT for IPv6-Cisco IOS Software
Release 12.3 Mainline,
http://www.cisco.com/en/US/products/sw/iosswrel/ps5187/product
s_configuration_guide_chapter09186a00801d6600.html
[20] SER網站, http://www.iptel.org/ser/