Case Study: P2P Internet Telephony with Skype

Case Study: P2P Internet Telephony with Skype

Skype is an immensely popular P2P application, often with seven or eight million users connected to it at any one time. Besides providing PC-to-PC Internet telephony service, Skype offers PC-to-phone telephony service, phone-to-PC telephony service, and PC-to-PC video conferencing service. Founded by the same individuals who created FastTrack and Kazaa. Skype was acquired by eBay in 2005 for $2.6 billion.

Skype uses P2P techniques in several modern ways, nicely illustrating how P2P can be used in applications that go beyond content distribution and file sharing. As with instant messaging, PC-to-PC Internet telephony is inherently P2P since, at the heart of the application, pairs of users (i.e., peers) communicate with each other in real time. But Skype also employs P2P techniques for two other important functions, namely, for user location and for NAT traversal.

Not only are the Skype protocols proprietary, but all of Skype's packet transmissions (voice and control packets) are encrypted. However, from the Skype Web site and a number of measurement studies, researchers have learned how Skype normally works [Baset 2006; Guha 2006; Chen 2006; Suh  2006; Ren 2006]. As with FastTrack, the nodes in Skype are organized into a hierarchical overlay network, with each peer classified as a super peer or an ordinary peer. Skype includes an index that maps Skype usernames to current IP addresses (and port numbers). This index is distributed over the super peers. When Alice wants to call Bob, her Skype client searches the distributed index to find out Bob's current IP address. Because the Skype protocol is proprietary, it is currently not clear how the index mappings are organized across the super peers, though some form of DHT organization is very possible.

P2P techniques are also used in Skype relays, which are useful for establishing calls between hosts in home networks. Many home network configurations provide access to the Internet through a router (typically a wireless router). These routers are in fact more than routers, and normally include a so-called Network Address Translator (NAT). We'll study NATs in "The Network Layer". For now, all we need to know is that a NAT prevents a host from outside the home network from initiating a connection to a host within the home network. If both Skype callers have NATs, then there is a problem - neither can accept a call started by the other, making a call seemingly impossible. The clever use of super peers and relays nicely solves this problem. Assume that when Alice signs in, she is assigned a non-NATed super peer. Alice can start a session to her super peer since her NAT only disallows sessions initiated from outside her home network. This allows Alice and her super peer to exchange control messages over this session. The same happens for Bob when he signs in. Now, when Alice wants to call Bob, she informs her super peer, who in turn informs Bob's super peer, who in turn informs Bob of Alice's incoming call. If Bob accepts the call, the two super peers select a third non-NATed super peer - the relay node - whose job will be to relay data between Alice and Bob. Alice's and Bob's super peers then instruct Alice and Bob respectively to start a session with the relay. Alice then sends voice packets to the relay over the Alice-to-relay connection (which was started by Alice), and the relay then forwards these packets over the relay-to-Bob connection (which was initiated by Bob); packets from Bob to Alice flow over these same two relay connections in reverse. And voila! - Bob and Alice have an on-demand end-to-end connection even though neither can accept a session originating from outside its LAN. The use of relays illustrates the increasingly sophisticated design of P2P systems, where peers carry out core system services for others (index service and relaying being two examples) while at the same time themselves using the end-user service (e.g., file download, IP telephony) being provided by the P2P system.

Skype has been a wildly successful Internet application, spreading to literally tens of millions of users. The breathtakingly fast and extensive adoption of
Skype, as well as P2P file sharing, the Web, and instant messaging before them, is a telling testament to the wisdom of the overall architectural design of  the Internet, a design that could not have foreseen the rich and ever-expanding set of Internet applications that would be developed over the next 30 years. The network services offered to Internet applications - connectionless datagram transport (UDP), connection-oriented reliable datagram transfer (TCP), the socket interface, addressing, and naming (DNS), among others - have proven enough to allow thousands of applications to be developed. Since these applications have all been layered on top of the existing four lower layers of the Internet protocol stack, they involve only the development of new client-server as peer-to-peer software for use in end systems. This, in turn, has allowed these applications to be rapidly deployed and adopted as well.



Tags

nodes, relays, router, peers, packets, p2p application, protocol

Copy Right

The contents available on this website are copyrighted by TechPlus unless otherwise indicated. All rights are reserved by TechPlus, and content may not be reproduced, published, or transferred in any form or by any means, except with the prior written permission of TechPlus.