VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic...

20
VoIP Case Study 1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology

Transcript of VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic...

Page 1: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 1

VoIP Case Study: Skype

Dr. Danny Tsang

Department of Electrical & Electronic EngineeringHong Kong University of Science and Technology

Page 2: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study

Phone becomes “the Portal” ...

Instantmessaging

InstantInstantmessagingmessaging

presence presencepresence

XMLXMLXML

audioaudioaudio

videovideo

datadata HTTPHTTPHTTP

… through which a whole newworld of services are delivered

Page 3: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 3

What Is Skype?

It is a peer-to-peer (P2P) overlay network for VoIP and other applications, developed by the people who did KaZaA

To a user, it is an Instant Messaging (IM) system that supports P2P VoIP and other applications

The fee-based SkypeOut service allows calls to regular phone numbers

Page 4: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 4

Skype - a raving success

Skype - computer <-> computer telephony You can talk to other computer based phones free

Skype Out - computer -> PSTN telephony You can call normal PSTN telephones - and pay for it

Skype In - PSTN telephony -> computer telephony You can be called from PTSN telephones You get a normal phone number

Currently on-line: ~1.8 million users ~150 million skype software download (www.skype.com

) Skype hardware phones available

Page 5: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 5

Overview of Skype P2P Network

Skype login Server

Message exchange withThe login server during login

Ordinary Host

Super node

Neighbors relationships in the Skype network

Major Entities Login Server

Single central server User authentication at login

(private/public keys) Ensures uniqueness of Skype user

names Super nodes

Nodes with public IP address, enough CPU, memory, and network bandwidth

Registrar functionality (distributed directory, presence service)

Signaling/media proxy (reachability of ordinary hosts)

Ordinary nodes Hosts behind FW/NAT

Page 6: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 6

Highlights of Skype P2P-based signaling

to find and locate users, Skype uses "supernodes" that are running on peer machines (In contrast, traditional VoIP systems use fixed central servers)

little management structure and overhead highly scalable

Strong NAT/firewall traversal capability e.g., use a peer relay to connect clients behind NATs, or use a TCP tunnel to a peer relay

to bypass a UDP blocking firewall Better voice quality than the MSN and Yahoo IM applications

Wideband voice codec: allow frequency between 50-8000Hz to pass through

Heavy software-based DSP operations at clients, including codecs, mixer and fancy echo cancellation, e.g., Thinkpad X31, an active Skype session consumes around 10-20% of CPU

Security feature: encrypts calls end-to-end, and stores user information in a

decentralized fashion Integrated buddy list, presence information, chat, and audio

conferencing

Page 7: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 7

Reverse Engineering of Skype

Based on “An Analysis of the Skype Peer-to- Peer Internet Telephony Protocol” by S. Baset and H. Schulzrinne at Columbia, September 15, 2004 “We observe, …, we think, …, we conjecture…, etc.”

Terminologies: Skype client (SC) Super node (SN) Host cache (HC): list of IP addresses and port number of

some super nodes

Page 8: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 8

Some Observed Facts

For NAT and firewall traversal, SC uses a variation of typical schemes such as STUN to determine the type of NAT and firewall it is behind. SC refreshes this information periodically. This information is stored, e.g., in the Windows registry

Use TCP to bypass UDP-restricted NAT/firewall Unlike its file sharing counter part KaZaa, a SC

CANNOT prevent itself from becoming a SC

Page 9: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 9

Skype Functions

Startup After installation, SC sends a HTTP 1.1 GET

to skype.com Login User search Call establishment and tear down Media transfer Presence messages

Page 10: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 10

Skype Login

1. Advertises its presence to other peers and its buddies.

2. Determines the type of NAT and firewall it is behind.

3. Discover online Skype nodes with public IP addresses.

•Stores Skype user names and passwords and ensures that Skype user names are unique across the Skype name space.•Login server: ns14.inet.telt.dk(Denmark)

Page 11: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 11

Skype Login algorithm

authentication with login server is not shown

Page 12: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 12

Skype Login in details A SC authenticates its user name and password with the login

server, advertises its presence to other peers and its buddies, determines the type of NAT and firewall it is behind, and discovers online Skype nodes with public IP addresses

These newly discovered nodes were used to maintain connection with the Skype network should the SN to which SC was connected became unavailable

SC must establish a TCP connection to a SN in order to connect to the Skype network

For a given entry in HC, SC tries to make the connection in the following order: TCP with the IP address and the port listed, the IP address and HTTP port (80), the IP address and SHTTP port (443)

After SC is connected to a SN, the SC gets the IP address of the Skype login server, and authenticates the username and password with the login server

SC sends UDP packets to 22 distinct nodes at the end of login process

Advertise its arrival Build an “alternative node tables” that provide a list of available

nodes SC can use should its current SN becomes unavailable

Page 13: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 13

User Search

Perhaps use Chord-like hash-based methods, combined with traditional blind searching techniques

SN acts like a search proxy for CN and caches searched results

Page 14: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 14

Use of An Immediate Node

Two reasons Passing NAT and firewall Acting as a mixer for conferencing traffic

Page 15: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 15

Conferencing

CPU and bandwidth usages at the bridging point (e.g., the A node above) increase with # conference participants

A

B C

B

A+C

A+B

C

Page 16: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 16

Conferencing

A call was established between A (the most powerful one) and B. Then B decided to include C in the conference.

It mixed its own packets with those of B and sent them to C over UDP and vice versa

Even if user B or C started a conference, A, which was the most powerful amongst the three, always got elected as conference host and mixer.

If iLBC codec is used, the total call 36 KB/s for a two-way call. For three-user conference, it jumps to 54 kb/s for the machine hosting the conference.

For a three party conference, Skype does not do full mesh conferencing. To host a conference with 5 parties you need a big PC, a Pentium 4 or

thereabouts. With a PIII CPU of 450 MHz you will be limited to hosting 3 parties.

A

B C

B

A+CA+B

C

Page 17: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 17

Reflection of Skype

Pros: “scales as it grows” Ease of use (self

configuration) Intelligence at the edge Transparent FW/NAT

traversal Integration of IM,

presence, voice Encrypted

communication

Cons: Proprietary protocols Closed world, no SIP/H.323 GWs No bandwidth control at super

nodes Reliability? Are there enough

super nodes? Not suitable for business usage,

privacy?

Page 18: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 18

Broad Impact Great application for WLAN-enabled handsets

A new opportunity for fixed-line operators New opportunity and challenge to mobile phone operators

and manufacturers (think when WLAN infrastructure and handsets become widespread)

New challenges to SIP/ENUM-based approaches Since naming on overlay networks could work well, DNS

may not need to expand its scope VoIP is a new must-to-have feature for IM systems A new view on P2P networks, which previously focused

on content rather than communications A large number of online Skype VoIP clients distributed

throughout the world can provide valuable network performance measurements and other information

Other issues, including anonymity vs. law enforcement

Page 19: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 19

Profound Impact Skype has shown, or at least has suggested, the

following: Signaling, the most unique property of traditional phone

systems, can now be accomplished effortlessly with self-organizing P2P networks

P2P overlay networks can scale up to handle large-scale connection-oriented real-time services such as voice

For Skype, the Internet is just a dumb "bit pipes“ We should focus on applications and services that run on

layers above pipes, since pipes or roads always only have relatively small business value themselves

Page 20: VoIP Case Study1 VoIP Case Study: Skype Dr. Danny Tsang Department of Electrical & Electronic Engineering Hong Kong University of Science and Technology.

VoIP Case Study 20

Reference

B. Goode, “Voice over Internet protocol (VoIP),” Proceedings of the IEEE, vol. 90, no. 9, pp. 1495 – 1517, Sep. 2002.

M. Maresca, N. Zingirian, and P. Baglietto, “Internet protocol support for telephony,” Proceedings of the IEEE, vol. 92, no. 9, pp. 1463 – 1477, Sep. 2002.

S. A. Baset and H. Schulzrinne, “An analysis of the Skype peer-to-peer internet telephony protocol,” Computer Science Department, Columbia University, Tech. Rep. CUCS-039-04, 2004. [Online]. Available: http://arxiv.org/pdf/cs.NI/0412017

C. Schlatter, “Why SIP?” 2005, Swiss Education and Research Network, SWITCH. [Online]. Available: http://vconf.switch.ch/econf_docs/sip_h323_skype.pdf

H. T. Kung, “P2P VoIP,” 2004, lecture notes on CS-143/CSCI-E135: Computer Networks. [Online]. Available: http://www.eecs.harvard.edu/cs143/