Updated: 4/30/2007; 4:05:41 PM.
Mark O'Neill's Radio Weblog
        

Monday, January 10, 2005

Sponging Skype

While TCP-tracing some SOAP messages recently, I noticed a bunch of connections originating from my laptop to computers around the world. A quick examination of my personal firewall logs showed that these were being initiated by Skype. I noticed that Skype was connecting out to personal computers in Spain and the Netherlands.

If you're running Skype, run the netstat command from the command-line and see for yourself. To understand what these connections are, you have to look into how Skype works. Skype has a "For Geeks Only" page which hints at how it works, but I think the real geeks will want to look at this excellent presentation: http://mnet.cs.nthu.edu.tw/paper/Chance/041125.pdf

My laptop is behind a NAT firewall which issues private non-routable IP addresses. This means that outsiders cannot initiate TCP connections to me. It happens that all the people with whom I communicate using Skype are also behind NAT firewalls. My copy of Skype can't open a port to them, and they can't open a port to me. In a centralized system, we would both connect to a central "Skype Server" (probably in Luxembourg, where Skype is headquartered). But, Skype is a decentralized P2P system, with no central servers. So, my laptop opens connections to a small number of other Skype users who have public IP addresses. These are known as "super nodes" in the Skype network. As the presentation (linked above) puts it, "Any node with a public IP address having sufficient CPU, memory and bandwidth is a candidate to become a super node". Right now, I am connected to a "super node" computer in the Netherlands. If I initate a call to a Skype contact, our call is routed through the same "super node", using their bandwidth. But their CPU is not necessarily used for the voice encoding, instead Skype holds an "election" and the fastest CPU of the three (two Skype clients and one "super node") gets the job of doing the encoding.

So, in Skype's network, computers with public IP addresses carry the weight. Additionally, a user who allows incoming TCP connections will experience better call quality, because it cuts out the middleman of a "super node". Skype's FAQ says as much, "

In the quest for even better voice quality, it is also advisable to open up incoming TCP and/or UDP to the specific port you see in Skype Options. This port is chosen randomly when you install Skype. In the case of firewalls, this should be easy to arrange. In some routers, however, you cannot configure incoming UDP at all (but you still can configure incoming TCP port forwarding, which you could/should do). " http://www.skype.com/help/faq/technical.html

This is an carefully worded paragraph. The "quest for even better voice quality" is as much for the Skype service as a whole, as for the individual user. In a clever reverse of the "Selfish Gene" thesis, a selfish motive winds up achieving an altruistic end. In fact, the use of the word "should", regarding configuring TCP port forwarding, suggests an altriustic motive - you "should" pull your weight and become a super-node. If we were all behind NAT firewalls, the whole Skype system wouldn't work (nor would Kazaa, with which Skype shares architecture).


10:54:19 PM    comment []

© Copyright 2007 Mark O'Neill.
 
January 2005
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Dec   Feb