9

Click here to load reader

Skype

Embed Size (px)

DESCRIPTION

A report on Skype.

Citation preview

Page 1: Skype

RELAYINGIn Reference

ofSkype

SURINDER KAUR2012CS13

02-10-2012

Page 2: Skype

1 Introduction

Skype is peer-to-peer VoIP application . It is used for voice calls and textmessages. Now file transfer and video conferencing is also alloweed.It was launched in 2003 by Niklas Zennstrom and JanusFriis. NowMicrosoft owns it.The first generation of VoIP is MSN and IM It is the sec-ond generation of VoIP technology and its successsor i.e. the third generationof voIP is represented by Google Talk

The term VoIP stands for Voice over Internet Protocol. and it refers to theprotocol and the technologies employed for voice communication and multi-media session over the IP. The other commonly used for the same purposeare Interent Telephony or IP telephony. Using these technologies a user canmake telephone calls via internet rather than the traditional public switchedtelephone networks. IT is a complete process that involve various steps. thesessteps are listed below:

• Signaaling and media channel setup

• Digitization of analog voice signals

• encoding of signals

• Packetization

• Transmission of packets over IP network

2 Services provided by Skype

Skype provides following services:

• Messaging

For text messaging the additional features provided are group chat,emoticons record of messaging history and even editing of previous mes-sages.

• Voice chat

It allows telephone calls between a pair of skype users, conferencingand use of a proprietary audio codec. The telephone call between apair of skype user for a group of country charges are same as chargesfor calls within the country.

1

Page 3: Skype

• Video conferencing

Now it supports video conferencing for all major software platform likewindows, Mac OS X, Linux. It can support video call upto 5 people.The latest version of skype supports high quality video for windows.

• Audio conferencing

Like video conferencing audio conferencing is also supported by allmajor platforms. However the number of user participate in audioconferencing is much more than that in video conferencing . It cansupport upto 25 participants.

3 Technical details

Skype is hybrid peer-to-peer and client-server system. The most interestingfeature of skype is that it is able to work efficiently even in the presenceof firewalls and NAT i.e. it is able to penetrate the NAT and firewall inpeer-to-peer approach.It uses decentralized approach. It has no central server other than thelogon server. The whole network is maintained in the decentralized mannerusing overlay peer-to-peer technology. Since it is usin g peer-to-peer technol-ogy . Hence each node that is part of the network has to contribute to thenetwork, its bandwidth and the some percent of CPU cycles. In this way thewhole network load gets distributed among all the participating nodes.Some important terms used in the Skype technology are described in follow-ing section:

Skype ClientEach Skype user is termed Skype client. All the skype users are similari.e. peers and all are termed Skype client. There is ony one server thatmaintains the login details of the user.

PortsSkype client opens the TCP or UDP connection on the specified portnumber. The Port number is given at the time of installation.

Host CacheHost cache is a table that contain the list of super nodes. Each entry ofsuper noder has its IP address and port number. Each SC refresh this

2

Page 4: Skype

cache at regular interval. Refreshing the table is the most importantpart of entire Skype operation. This cache helps client to find the listof all reachable nodes.

CodecsThe codec is used to convert the analog voice signals to digital signals.Skype codecs allow frequencies between 50-8000 Hz to pass through.This range is the characteristic of wideband codec.

Buddy listBuddy list i.e. the list of all the Skype clients to which a user wantsto communicate to. The information about the buddies is stored inthe Windows registry. The buddy list is digitally signed and encrypted.The list is local to the SC’s machine and is not stored on the centralserver. Hence when a client uses a different machine it need to log onto Skype network and reconstruct its buddy list.

EncryptionSkype uses 256-bit encryption algrithm AES i.e. Advanced Encryp-tion Standard to encrypt the digital data before transmitting it on theinternet.

NAT and firerwallSC uses STUN and TURN to determine the type of NAT and firewallbehind which the SC is working. Like the buddy list it is also storedlocally on the windows registry. Hence it needs to refreshed periodically.

4 Skype Functions

The step by step description of the Skype Functions is as following:

Startup When the Skype Client run the software for the first time,this step is required.Once it get installed further this step is not needed.

Login Each time the SC wants to use Skype it needs to login. Itrequries to enter its login details i.e. username and password. Thenthe central server autenticates it with the stored details. The login stepalso notifies the other SC about the presence of the currently loginedSC. In this step the NAT and Firewall are also determined.

User search Skype uses the Global Index Technology to searchfoe the other users.This search is distributed. It is claimed by the Skype

3

Page 5: Skype

and observed during various researches that it is guranteed to find a userif it exists and has logged in during the llast 72 hours. Skype providesa search dialog box where user can enter the SC it is searching for andpress the find button. The search process proceed s in differntly on thedifferent type of networks. The search process is explained briefly :

When the SC is on public IP address The SC sends a TCPpacket to its Super Node(SN).

SN in turn provide SC list of four nodes with their IP address andport number to contact.

Now SC sends UDP packet to these 4 nodes asking wheter theyare the node SC is looking for. If it find the nodde SC stops thesearch. In case it fails to find the node, it informs the SN usingTCP packet.

Now SN provide it list of 8 different nodes to contact to. AgainSC asks these nodes using UDP, if it is successful this time it stopsotherwise it proceed in the same manner until it finds the user orit is determined that user doesn’t exists.

However the researches shows thst the Skype able to find the userif it exists within few seconds.

When Sc is behind port-restricted NAT A SC behind a port re-stricted NAT exchanges data between SN, and some of the nodeswhich responds to its UDP request during login process.

SC behind port-restricted NAT, UDP-restricted firewallSC sends its search request over TCP to its SN.

The SN then performs the search on the behalf of the SC. Then SNinforms SC of the search results. Thus in this case the SC itselfdoes not contact any of the nodes.

It is worth noting that the search results are cached at theintermediate nodes.

Call establishment and Tear DownCall can be made to a user in the Buddy list or to the user not inthe buddy list. The process for call establishment is explained in thefollowing :

When the callee is in the buddy list When the callee is alreadythere in the SC’s buddy list the SC just need to call the buddy.However the call establishment mechanism is different for differ-ent network setup. The following points desccribe the call setupprocess in detail.

4

Page 6: Skype

Caller and the callee both are on the public IPAs the caller clicks on the call button, the caller sends aTCP : SYN message to establish the connection. The calleeacknowledges the caller’s request by sending a TCP : ACKpacket.In this way TCP connection between the caller and the calleeestablishes. After wards the caller and the callee communi-cates using TCP connection.

Caller behind port-restricted NAT, callee on public IP

In this case the signaling and messages don’t flow directlybetween the caller and the callee. The caller sends signalinginformationover TCP to a super node.Now the super node forwardds the signal to callee over TCP.In this way the call gets established.

Both are behind the port-restricted NAT, UDP-restricted firewall

The call is established via supernode over TCP connection.and then they communicate.

When the callee is not in the buddy listWhen the callee is not in the buddy list of the caller, the caller firstneed search the callee over the networ, using the above mentionedapproaches. When it finds the callee , add it to its buddy list andthen call establisment is done in the same way when the callee isin the buddy list of the caller.

TEARDOWN : The process of tear down is same as the processof call establishment.

Media Transfer and Codecs:The process is explained in the following points:

When both the caller and the callee are on the public IP

The media flows over the UDP betweent he caller and the callee.

Either of the caller or the callee is behind the port-restricted NAT

In this case the audio data is transmitted via a supernode overUDP.

Both are behind port-restricted NAT and UDP-restricted firewall

5

Page 7: Skype

The communication is done via supernode over TCP.

Some important feature supported by the Skype during audio/videotransfer:

• Silence Suppression : Slice suppression means that when nei-ther the caller nor the callee is sending any data i.e. not speaking,then the voice packets should not flow between them. Howeverthe Skype does not support silence suppression.

• Skype supports puttingcallonhold.

• The experiements shows that the Codec frequency range is 50 Hzto 8000 Hz.

Conferencing

5 Security in Skype

Skype uses 256 − bit encryption algorithm AES i.e. Advanced EncryptionStandard. This algorithm is considered to be the strongest encryption algo-rithm, which is also used by the U.S. govt. organizations.

6 Relaying in Skype

6.1 Relaying

When the two peers in any peer-to-peer network could not communicattedirectly due to any reason, they communicate via another peer or node inp2p network. Such communication techniques is termed as relaying.Relaying plays a very important role in Skype p2p networking.

6.2 Relaying is needed in the following cases:

• When callee is behind NAT ,in this case if the caller attempts toestablish the connection in usual way or directly, then the caller initi-ated communication will be considered as outside to inside connectionattempt by the NAT aat callee’s end. So the NAT will simply refusethe connection attempt.

6

Page 8: Skype

Hence the caller need the assistance from relay server to establish theconnection. The caller is connected to a superpeer, When it wantsto call the callee, it first informs the superpeer that it wants to haveconnection with the specified callee.

The superpeer then communicate this request to the non-NATed su-perpeer to which the callee is connected. The callee’s superpeer theninforms this to the callee.

The callee then sends a fake message addressed to the caller, this willmake a hole in the NAT.

Now the caller’s message can enter the callee’s network. Because thesemessages will be considered as response to the callee’s fake message.

• Boththecaller and the callee isbehind NAT, in this case neitherthe caller nor the callee can accept a call initiated by the other, makingthe call seemingly impossible.

Now the super peers are used for relaying.The caller should have con-nection with a non-NATed superpeer to be able to call a callee behindthe NAT. On the callee’s end it is required that the callee should alsohave a connection with a non-NATed super peer to recieve the callsfrom a caller behind NAT.

When the caller wants to call callee behindNAT, it first informs to thenon-NATed superpeer to which it already has the connection cconnec-tion that it wants to make call to the specific callee by mentioning itsIP and port.

The superpeer inturn will inform to the superpeer to which the callee isconnected that the caller with given IP and port wants to have commu-nicaation wih the callee. Now the callee’s superpeer informs the calleethat the caller wants to communicate with you.

Now its upto callee, whether it accepts the call or not. If callee acceptsthe caller’s request the involved super eers select a third party non-NATed superpeer , this superpeer is termed the relay node and its roleis to relay the messages between the caller and the callee through thecommunication.

The superpeer connected to the caller and callee then instructs thecaller and the callee respectively to establish a connection with the cho-sen superpeer.

Now the caller and the callee both get connected to a common superpeer-the relay node.

7

Page 9: Skype

When caller wants to send message to the calle, it first transmits themessage to the relay node, which forward the packet to the callee.

When the callee wants to response to the caller, the callee simply sendsthis response to the relay node, which forward it to the caller.

In this way the whole communication between the caller and calleebehind NAt communicates.

8