using ipv6 for sip-based voip applications · using ipv6 for sip-based voip applications dr....
TRANSCRIPT
-
Using IPv6 for SIPUsing IPv6 for SIP--based based VoIPVoIPApplicationsApplications
Dr.Dr. WhaiWhai--En ChenEn ChenResearch Assistant Professor
Dept. of Computer Science and Information EngineeringNational Chaio Tung University
[email protected]@mail.nctu.edu.twTEL: +886-3-5731924
-
2
Outline
Introduction to IPv6Introduction to IPv6IPv6 Winsock ProgrammingIPv6 Winsock ProgrammingIPv4/IPv6 Translation for ApplicationsIPv4/IPv6 Translation for ApplicationsIPv4/IPv6 Translation for NetworksIPv4/IPv6 Translation for NetworksSIPv6 AnalyzerSIPv6 AnalyzerIPv4/IPv6 SIPIPv4/IPv6 SIP--based based VoIPVoIP DeploymentDeploymentConclusionsConclusions
-
3
IPv6 Address Notation
An IPv6-layer identifier for an interface or set of interfacesPreferred form
3FFE:3600:0:FF:8:800:200C:417ACompressed form
FF01:0:0:0:0:0:0:7 becomes FF01::7IPv4-embedded
0:0:0:0:0:0:140.113.131.3 or ::140.113.131.3Address prefix
3FFE:3600:B:88::/64 (note: no masks in IPv6!)128-bit IPv6 Address/prefix length
-
4
Basic Address Types
UnicastAddress of a single interfaceDelivery to single interfacefor one-to-one communication
MulticastAddress of a set of interfacesDelivery to all interfaces in the setfor one-to-many communication
AnycastAddress of a set of interfacesDelivery to a single interface in the setfor one-to-nearest communicationNearest is defined as being closest in term of routing distance
No Broadcast
M
M
M
A
A
A
U
-
5
IPv6 Prefix Types
Address type Binary prefixIPv4-compatible 0000...0 /96 (96 zero bits)global unicast 001/3link-local unicast 1111 1110 10/10site-local unicast 1111 1110 11/10multicast 1111 1111/8
All other prefixes reserved (approx. 7/8ths of total)Anycast addresses allocated from unicast prefixes
-
6
IPv6 Global Unicast Addresses
TLA (Top Level Aggregator) = 13 bitsTLA routers(default-free router) do not have a default route, only route with 16 bits prefixmay be assigned to providers or exchanges
Res= 8 bitsReserved for future use in expanding the size of either the TLA or NLA
NLA (Next Level Aggregator)= 24 bitsSLA (Site level Aggregator)= 16 bitsPublic topology- Collection of larger and smaller ISPSite topology- Collection of subnets within an organization’s site
-
7
Link-Local Unicast Addresses
meaningful only in a single link zone, and may be reused on other linksLink-local addresses for use during auto-configuration and when no routers are presentRequired for Neighbor Discovery process, always automatically configuration (Interface ID+DAD)An IPv6 router never forwards link-local traffic beyond the linkPrefix= FE80::/64
1111111010 000...00 Interface ID
64 bits10 bits 54 bits
-
8
Special IPv6 address
Unspecified address(0:0:0:0:0:0:0:0 or ::)Indicate the absence of an addressEquivalent to IPv4 0.0.0.0Never assigned to an interface or used as a destination address
Loopback address (0:0:0:0:0:0:0:1 or ::1)Identify a loopback interface
IPv4-compatible address (0:0:0:0:0:0:w.c.x.z or ::w.c.x.z)Used by dual-stack nodesIPv6 traffic is automatically encapsulated with an IPv4 header and send to the destination using the IPv4 infrastructure
IPv4 mapped address (0:0:0:0:0:FFFF:w.c.x.z or ::FFFF:w.c.x.z)Represent an IPv4-only node to an IPv6 nodeNever used as a source or destination address of IPv6 packet
NSAP(Network Service Access Point) address(FP=0000001)IPX(Internetwork Packet Exchange) address (FP=0000010)
-
9
IPv6 Multicast addresses
Multicast address can not be used as source or as intermediate destination in a Routing headerlow-order Transient(T) flag indicates permanent (T=0) / transient (T=1) group; three other flags reservedScope field
1: node-local2: link-local5: site-local8: organization-localE: globalOthers: reserved
T bit
-
10
IPv6 Multicast addresses(cont.)Special multicast IPv6 address
FF01::1Node-local scope all-nodes multicast address
FF02::1Link-local scope all-nodes multicast address
FF01::2Node-local scope all-routers multicast address
FF02::2Link-local scope all-Routers multicast address
FF05::2Site-local scope all-routers multicast address
Use low-order 32 bits, each group ID maps to a unique Ethernet MAC address (RFC 2373)
-
11
IPv6 Interface IdentifierLowest-order 64-bit field of unicast address Globally unique or locally unique within a subnetFuture higher-layer protocols may take advantage of globally-unique interface IDs to identify nodes independently of their current locationConfigure interface identifier
Manual configurationDHCPv6 (configures whole address)automatic derivation from MAC address or other hardware serial numberpseudo-random generation (for client privacy)the latter two choices enable “serverless” or “stateless”auto-configuration, when combined with high-order part of the address learned via Router Advertisements
-
12
IEEE 802 Addresses
U/L bit (u)Universally (0) or Locally (1) Administration
U/G bit (g)Unicast (0) or Group (1) Address
-
13
IEEE EUI-64 Addresses
U/L bit (u)Universally (0) or Locally (1) Administration
U/G bit (g)Unicast (0) or Group (1) Address
-
14
Interface ID Using IEEE EUI-64
-
15
IPv6 Addresses for a Host
Unicast addressesA link-local address for each interface (FE80::[Interface ID])Unicast address for each interface
Site-local, orOne or multiple aggregatable global unicast
A loopback address (::1)
Multicast addressesNode-local all-nodes multicast address (FF01::1)Link-local all-nodes multicast address (FF02::1)Solicited-node address for each unicast addressMulticast address of joined group
-
16
Loop-back IPv6 Address
-
17
6to4 Tunnel Address
-
18
-
19
UDP Client/Server Programming
sendto
recvfrom
close/closesocket
recvfrom
sendto
close/closesocket
data
data
UDP Client UDP Server
socket
bind
socket
These functions are the same for both IPv4 and IPv6.These functions are the same for both IPv4 and IPv6.
-
20
IPv4/IPv6 Socket Parameter Mapping
Socket參數名稱轉換
IPv4 IPv6
AF_INET AF_INET6
PF_INET PF_INET6
IN_ADDR_ANY inaddr6_any
-
21
IPv4/IPv6 Data Structure Mapping
資料結構轉換
IPv4 IPv6
in_addr in6_addr
sockaddr sockaddr_in6
sockaddr_in sockaddr_in6
-
Comparison of socket address structure
-
23
IPv4/IPv6 Data Structure Mapping
資料結構參數轉換
IPv4 IPv6
sin_len sin6_len
sin_family sin6_family
sin_port sin6_port
sin_addr sin6_addr
s_addr s6_addr
-
24
Domain Name and IP Conversion APIs
函式轉換
IPv4 IPv6
Name-to-addressFunctions
Address conversionFunctions
inet_aton()inet_addr() inet_pton()
inet_ntoa() inet_ntop()
gethostbyname()gethostbyaddr()
getipnodebyname()getipnodebyaddr()getnameinfo()getaddrinfo()
-
25
-
26
Results of Using Checkv4.exe
-
27
IPv4 SIP User Agent
Provided by CCL/ITRI and NTPOSIP-based VoIP phone running on WindowsSupport H.263 Video codecSupport G.711u/G.711a/G.723/G.729 Audio codecsSupport registrationSupport authentication
-
28
GUI Problem
IP Address ControlIPv4 specifiedDo not accept domain name and IPv6
The Variable-length Input Component
(A)
(B)
-
29
Get Local Address
SIP User Agent should provide the IPv4 and IPv6 address of the local host.The IPHelperIPHelper functions
Microsoft Windows system provides this function from Windows 98This solution works on both Windows XP and 2003It’s a Windows-only solution
Function name: GetAdaptersAddresses()
-
30
Parsing IPv6 URI in SIP and SDPIPv4 SIP URI sip:[email protected]:[email protected]:5060:5060
IPv6 SIP URI sip:wechen@[sip:wechen@[3ffe:1345:5643::33ffe:1345:5643::3]:5060]:5060
IPv4 parser assumes that semicolonsemicolon is used to separate the IP address and port number, and the SIP parser in SIP and SDPSIP and SDP protocol stacks should be modified to process IPv6 address and port number.
IP6 address typeIP6 address type and IPv6 address in Session Description Protocol (SDP)
c=IN IP6 FE80:60::2c=IN IP6 FE80:60::2
-
31
IPv6 Link-local Address Problem
Link-local IPv6 address with scope-id E.g. fe80::201:2ff:fe85:37ed%3Used by link-local addressIdentify the same address on different interface
Scope-id must be specified when connecting to sites using link-local address
An extra parameter should be added in the data structure
-
32
Porting IPv4 SIP UA to IPv6 Results
IPv4 SIP UA contains about 100,000-line codes in 150files.We change about 600-line codes in 39 files.About 300-line codes are not identified by checkv4.exeSIPv6 UA supports
IPv4 or IPv6 communicationIPv6 address in SIP and SDP IPv6 address in GUI
-
33
Result: A SIPv6 User Agent
Internet Internet (IPv4)IPv6 NetworkIPv6 Network
(NCTU VoIP Lab)
2.Dialing
4.Video
IPv6 NetworkIPv6 Network(Showroom)
3.1 INVITE
3.2 INVITE
3.3 INVITE
3.4 200 OK3.6 200 OK
3.7 ACK 3.5 200 OK3.8 ACK
3.9 ACK4. RTP
4. RTP
4. RTP
1.ConfigurationSIP Signaling (IPv6)SIP Signaling (Tunnel)
圖例:
Dual-stackRouter
SIPv6 UASIPv6 UA
Dual-stackRouter
Tunneling
4.Video
Using IPv6 AddressesUsing IPv6 Addresses
-
34
Socket-layer Translator (SLT)
Users can access IPv6 resources through IPv4 applications and SLUsers can access IPv6 resources through IPv4 applications and SLT.T.
Function Mapper
AddressMapper
Name Resolver
IPv4 ApplicationsIPv4 Applications
-
35
Address Translation Example: Originator
IPv4 app.
ExtensionNameResolver
AddressMapper Translator
IPv6
Dual Stack DNSHost6
Resolve an IPv4 address for “host6”
Send an IPv4 packet to Host6
Query ‘A’Query ‘A’ and ‘AAAA’ for host6
Reply only with‘AAAA’
Request one IPv4 address (internal IPv4 address allocation)Reply with the IPv4 address
Reply with the ‘A’ record
An IPv4 packet
Request IPv6 address
Reply with the IPv6 address
Translate IPv4 to IPv6An IPv6 Packet
An IPv6 packet ( Reply)
Request IPv4 address
Reply with the IPv4 address
Translate IPv6 into IPv4An IPv4 packet
Translation(v6->v4)
Translation(v4->v6)
-
36
Address Translation Example: Recipient
IPv4 app.
ExtensionNameResolver
AddressMapper
Translator IPv6
Dual Stack Host6
Receive a data from “host6”
Reply an IPv4 data to “host6”
An IPv4 reply packet
Request IPv6 address from table
Reply with the IPv6 address
Translate v4 packet to v6An IPv6 packet
Translation(v4->v6)
An IPv6 packet
Request IPv4 address from table
Reply with the IPv4 addressTranslate IPv6 to IPv4 headerAn IPv4 packet
Translation(v6->v4)
-
37
SIPv6 Translator
Through manual modification and Socket-layer Translator, we have IPv6 SIP UAs (SIPv6 UAsSIPv6 UAs).
However, only using SIPv6 UAs, which can utilize rich IPv6 addresses, does NOTNOT solve the IP address shortage problemin VoIP deployment, because a SIPv6 UA cannot communicate with a SIPv4 UA (e.g. CISCO7960).
To solve this problem, we develop a SIPv6 TranslatorSIPv6 Translator based on the architecture proposed in IETF RFC 2766 (Network Address Translation and Protocol Translation, NAT-PT).
The SIPv6 Translator is a gateway between IPv6 and IPv4 networks. The SIPv6 Translator can translate not only the IP headers but also the application-layer headers (e.g. SIP and SDP).
-
38
NAT-PT with DNS-ALG
IPv4 NetworkTranslatorTranslator
IPv6 Network
UA1
DNSDNS-ALG
DNS
UA2
DNS2
DNS1
3ffe:3600:1::3
3ffe:3600:1::2
140.113.87.2
140.113.87.1
The NAT-PT translator configuration•Address Pool: 140.113.87.51-60•NAT-PT Prefix: 3ffe:3600:2::/96
The NATThe NAT--PT translator configurationPT translator configuration•Address Pool: 140.113.87.51-60•NAT-PT Prefix: 3ffe:3600:2::/96 ua2.ipv4.nctu.edu.twua1.ipv6.nctu.edu.tw
-
39
NAT-PT operations with DNS-ALG(IPv6 IPv4)
UA1 DNS2 UA2DNS1
DNS Query (AAAA)
DNS Response (AAAA)
DNS Query (AAAA)
DNS Response (AAAA)
DNS Query (A)
DNS Response (A)
ICMPv6 Message (MAC Address Query)
ARP Message (MAC Address Query)
ICMPv6 Message (MAC Address Response)
ARP Message (MAC Address Response)
DNS-ALG+
NAT-PT
IPv6 Packet
IPv4 Packet
1.1 1.21.4
1.5
1.71.8
1.9
1.10
1.3
1.6
1.11 1.12
1.13
1.14
IPv6 Network IPv4 Network
-
40
NAT-PT operations with DNS-ALG(IPv4 IPv6)
ICMPv6 Message (MAC Address Response)
UA1DNS-ALG
+NAT-PT
DNS2 UA2DNS1
DNS Response (A)
2.3
2.6
ICMPv6 Message (MAC Address Query)
ARP Message (MAC Address Query)
ARP Message (MAC Address Response)
DNS Query (A)DNS Query (A)
DNS Query (AAAA)
DNS Response (A)
DNS Response (AAAA)
IPv4 Packet
IPv6 Packet
2.12.2
2.4
2.5
2.7 2.8
2.9
2.10
2.112.12
2.13
2.14
IPv4 NetworkIPv6 Network
-
41
System Architecture of SIPv6 Translator
ALG: Application Level GatewayDNS: Domain Name ServiceSIP: Session Initiation ProtocolNIC: Network Interface ControllerSIIT: Simple IP and ICMP Translation; see IETF RFC 2765NAT-PT: Network Address Translation and Protocol Translation; see IETF RFC 2766
SIIT Component
IPv6-IPv4 AddressMapping
-
42
IPv4/IPv6 Translation for Registration
UA3 SIP-ALG SIPv4 Server
3.1 REGISTER sip.ipv4.nctu.edu.twVia: SIP/2.0/UDP [3ffe:3600:1::4]:5060To: From:Contact:
IPv4 Network
3.2 REGISTER sip.ipv4.nctu.edu.twVia: SIP/2.0/UDP 140.113.87.53:5061To: From:Contact:
3.3 200 OKVia: SIP/2.0/UDP 140.113.87.53:5061To: From:Contact:
3.4 200 OKVia: SIP/2.0/UDP [3ffe:3600:1::4]:5060To: From:Contact:
IPv6 Network
-
IPv4/IPv6 Translation for INVITE Transaction(IPv4->IPv6)
UA1SIP-ALGNAT-PT UA2SIPv4 Server
4.1 INVITE sip:[email protected]: SIP/2.0/UDP 140.113.87.2:5060Contact: c=IN IP4 140.113.87.2m=Audio 9000 RTP/AVP 0 4 8
4.2 INVITE sip:[email protected]:5061Via: SIP/2.0/UDP 140.113.87.40:5060Via: SIP/2.0/UDP 140.113.87.2:5060Contact: c=IN IP4 140.113.87.2m=Audio 9000 RTP/AVP 0 4 8
4.3 INVITE sip:1234@[3ffe:3600:1::3]:5060Via: SIP/2.0/UDP [3ffe:3600:2::140.113.87.40]:5060Via: SIP/2.0/UDP 140.113.87.2:5060Contact: c=IN IP6 3ffe:3600:2::140.113.87.2m=Audio 9000 RTP/AVP 0 4 8
4.4 200 OKVia: SIP/2.0/UDP [3ffe:3600:2::140.113.87.40]:5060Via: SIP/2.0/UDP 140.113.87.2:5060Contact: sip:[email protected]=IN IP6 3ffe:3600:1::3m=Audio 9000 RTP/AVP 0
4.5 200 OKVia: SIP/2.0/UDP 140.113.87.40:5060Via: SIP/2.0/UDP 140.113.87.2:5060Contact: c=IN IP4 140.113.87.52m=Audio 9002 RTP/AVP 0
4.6 200 OKVia: SIP/2.0/UDP 140.113.87.2:5060Contact: c=IN IP4 140.113.87.52m=Audio 9002 RTP/AVP 0
4.7 ACK sip:[email protected]: SIP/2.0/UDP 140.113.87.2:5060Contact:
4.8 ACK sip:[email protected]:5061Via: SIP/2.0/UDP 140.113.87.40:5060Via: SIP/2.0/UDP 140.113.87.2:5060Contact:
4.9 ACK sip:1234@[3ffe:3600:1::3]:5060Via: SIP/2.0/UDP [3ffe:3600:2::140.113.87.40]:5060Via: SIP/2.0/UDP 140.113.87.2:5060Contact:
IPv6 Network IPv4 Network
-
44
SIPv6 Analyzer
Protocol Parser Protocol Parser (using (using EtherealEthereal parser)parser)
Control PanelControl Panel
Packet ListPacket List
Hex DumpHex Dump
-
45
SIP Viewer
SIP Dialog CollectionSIP Dialog Collection
SIP FlowchartSIP Flowchart
SIP Flowchart from HeadersSIP Flowchart from Headers
SIP Viewer automatically collect SIP messages.SIP Viewer automatically collect SIP messages.
CallCall--IDID FromFrom ToTo
-
46
RTP Viewer
RTP Session ListRTP Session List
Video PlaybackVideo Playback
Video and Voice Control PanelVideo and Voice Control Panel
Yueh-Hsin Sung
RTP Viewer automatically collect RTP packets according to the SDRTP Viewer automatically collect RTP packets according to the SDP c and m fields.P c and m fields.
RTP Viewer can play back Video and Voice!RTP Viewer can play back Video and Voice!
-
47
The IPv6 SIP-based VoIP Deployment
•0944006XXX is assign to IPv6 network.•0944004XXX is assign to IPv4 network.•The forwarding rules are set in the SIP proxies.
-
48
The IPv6 and IPv4 SIP Environment
Windows Messenger SIPv6 Translator& SIPv6 Analyzer
SIPv6 UA (implemented by NCTU VoIP Lab)
PSTN Speaker Phone (PSTN) Snom 200 CISCO 7940 Pingtel
-
49
The PSTN Gateways
CISCO 2621XM Gateway
Vontel Gateway (implemented by ITRI/CCL Taiwan)
-
50
The Interoperability Test Results
SIP Message SDP Message
IP Soft Phone
PingTel 2.1.10IP Hard Phone
PSTN Gateway
Request URI Contact Via From To c m o
CCL Skin UA
Windows Messenger 4.7.2009
snom 200
Cisco IP Phone 7940 Series
VontelPSTN Gateway
CiscoPSTN Gateway
•The SIPv6 UA developed by NCTU can communicate with all of the commercial IPv4 SIP UAs through the SIPv6 Translator.
•The IPv4 SIP UAs are deploy in the NTP VoIP platform.http://www.voip.ntpo.org.tw
-
51
Conclusions and Future Works
This presentation introduced two IPv6 translation mechanisms (i.e., SocketSocket--layer Translatorlayer Translator and SIPv6 SIPv6 TranslatorTranslator) for SIP-based VoIP applications.
These mechanisms are useful to promote the SIP-based VoIP applications to IPv6.The ENUM service can be used to deploy the IPv4 and IPv6 SIP interworking environment. The functions of the proposed translation mechanisms can be verified in this environment.
In this year (2005), we will extends the IPv6 network to support Mobile IPv6Mobile IPv6 and develop an IPv6 SIP UAIPv6 SIP UAon the Cellular/WLAN dualCellular/WLAN dual--mode handsetsmode handsets.
-
52
ReferencesRFC2460. Internet Protocol, Version 6 (IPv6) Specification. S. Deering, R. Hinden. December 1998. (PS)RFC3513. Internet Protocol Version 6 (IPv6) Addressing Architecture. R. Hinden, S. Deering. April 2003. (PS)RFC2463. Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification. A. Conta, S. Deering. December 1998. (DS)RFC2461. Neighbor Discovery for IP Version 6 (IPv6). T. Narten, E. Nordmark, W. Simpson. December 1998. (DS)Whai-En Chen, C.Y. Su, Quincy Wu, “Porting SIP User Agents to IPv6”, 1st ASEAN IPv6 Summit 2003, Malaysia, October 20-22 2003.Whai-En Chen, C.Y. Su and Y.-B. Lin, “NCTU SLT: A Socket-layer Translator for IPv4-IPv6 Translation”, accepted and to appear in IEEE Communications Letters.Whai-En Chen, Quincy Wu, Yi-Bing Lin and Yung-Chieh Lo, "Design of SIP Application Level Gateway for IPv6 Translation", Journal of Internet Technology Vol. 5 No. 2, 2004.Whai-En Chen and Quincy Wu. “Development and Deployment of IPv6 SIP-based VoIP Networks”, IEEE SAINT2005, Italy.Whai-En Chen, Chia-Yung Su and Jui-Hung Weng. “Development and Deployment of IPv6 SIP-based VoIP Networks”, IEEE AINA2005, Taiwan.
-
53
AcknowledgementsThe IPv6 development project is sponsored by NICI IPv6 Steering NICI IPv6 Steering Committee, R&D DivisionCommittee, R&D Division.
The IPv6 deployment project is sponsored by NICI IPv6 Steering NICI IPv6 Steering Committee, Promotion DivisionCommittee, Promotion Division.
The IPv4 SIP VoIP testbed deployment is sponsored by the NTP NTP VoIP ProjectVoIP Project.
The IPv4 SIP UA and Vontel Gateway is obtained through the ITRI/NCTU JRC ProjectITRI/NCTU JRC Project.
LAB 117&
VoIP LAB
-
54
Contact InformationDr. WhaiWhai--En ChenEn Chen
Research Assistant ProfessorDpet. of CSIE, National Chiao Tung University
Email: [email protected]@mail.nctu.edu.twVoIP: sip:[email protected]:[email protected]: +886+886--33--57319245731924
-
55
Future TopicsIPv6 Auto-configuration (IPv6, ICMPv6)IPv6 Routing (RIPng, OSPF, BGP4+)IPv6 Security (AH and ESP headers, For MIPv6)Mobile IPv6 (HMIPv6 and Fast Handover for MIPv6)IPv6 Anycast AddressIPv6 MultihomingIPv6 QoS (Traffic Class, Flow Label)