Evanescent Thoughts

Evanescent Thoughts

Do IM Clients (Pidgin,Skype et al) Detect Subnets and Avoid wastage of Internet Bandwidth ?? #linux

with 5 comments


I Post this  hoping someone  would explain to me How stuff works when you make a Video call across Internet. Also, Please correct me wrong if I am wrong anywhere.   Now, What I have been thinking in mind is that, When Alice and Bob, sitting in different locations( not in the same subnet)  try to have a conversation through  some IM protocol, the server acts as a mediator. That is, the server gets the message or data from Alice and sends it to Bob and vice versa.  So I   assumed the same to be the working scenario in case Alice and Bob happen to be in same Subnet but say try to call each other on skype. I am now beginning to doubt this as I noticed something peculiar as I tried to make some video calls. My  observation is that in the case where Alice and Bob are in the same subnet and connected to Internet through a common gateway or  one of them acting as gateways.

My setup is as follows : All computers run on Ubuntu Lucid Lynx

BSNL Modem :    IP: 192.168.1.1 with a bandwidth of 512 Kbps

Vostro Laptop :    Connected to the BSNL Modem  via eth0 and running a Wifi network on wlan0( 54Mbps) both of which share the same internet connection( refer this ) eth0: 192.168.1.2 and wlan0: 10.42.43.1

Studio Laptop:    Connected to the Wifi connection set up on the Vostro Laptop and has the IP address as wlan0: 10.42.43.10 . So any http request from this goes to the BSNL modem via my Vostro Laptop (10.42.43.1)

With this setup, My Vostro and Studio laptops are in a Subnet and they are connected to the Internet via my Vostro Laptop. Now when I start  any  file download from Internet or torrents, I get some 80KBps on my eth0 on Vostro and some 60KBps goes to the Studio Laptop via the wireless lan 🙂 .. Now I install skype on both the machines 10.42.43.1 and 10.42.43.10 and create 2 different accounts and make a video call from one account to another . Now I thought the connection on 192.168.1.2 was supposed to handle the traffic for both the comps and forward the packets from internet for 10.42.43.10 from the internet server that hosts the video call. But what actually happens is that there is no traffic  to outside the subnet. That is my internet traffic is 0 kbps both incoming and outgoing whereas the communication required for the video calls happen directly between 10.42.43.1 and 10.42.43.10 without a single packet being sent to the outside network (192.168.1.1).

So this is something like when a video call is established on a subnet, it works P2P and not through the server on the internet. CORRECT me if this is wrong.  To clearly see .. check the following screen shot.

Now the one on the Left is my 192.168.1.2 on eth0 and 10.42.43.1 on wlan0 . The yellow circled one is the traffic on 10.42.43.X subnet . Notice that while the call is in progress, The connection on 192.168.1.2 which is connected to internet is not even 1KBps . Its in Bytes per sec .  This is exactly what I am talking about. The video call works Peer-to-Peer as if it is happening locally and not through some Internet Service. Calls to my friends outside, create traffic on 192.168.1.2 as expected. Only when the calls are within the subnet, everything seems to be and inside business :). Quite interesting is it 🙂 . That means, I dont have to pay for the ISP bandwidth  that will be used in all this video calls within a subnet. This is why when I called my friends, the audio and video were poor quality and when I called within the subnet, the clarity was awesome :).

This was the case with video calls on Skype and Pidgin on Ubuntu Lucid Lynx.

Now the following questions :

  1. Is this how its supposed  to happen?? So the server hosting the video call doesnt have to receive and deliver data during the call if both Alice and Bob are within same subnet connected to internet ??
  2. Is this the case with only video and audio calls or for anyother protocols ???
  3. What is this thing exactly that makes the pidgin or skype detect that it doesnt have to pass the packets to the internet and just pass  it directly to the computer on the subnet . It works as though a direct P2P connection is set up.
  4. Does it happen only with Linux or Windows and Mac too ??

Applications :

Imagine you are in an organization and  you have say 10 computers connected in a subnet  which is connected to an Internet gateway. Now every one within the subnet can do a video chat using the skype and gmail accounts without even passing a single packet to the outside network . This means the company doesnt waste the internet badnwidth when the calls are made within the subnet .. Some thing like calling from reliance to reliance is free :P.

People who have some ideas about this , please post as comments or let us discuss on IM 🙂

PS : wrote it in a hurry 😛 .. so bear with the formatting 😛

Advertisements

Written by Sathya Narayanan

June 29, 2010 at 9:33 am

5 Responses

Subscribe to comments with RSS.

  1. For your Q1, you could just check where your data packets are going using some tool?

    I haven’t been up-to-date on the latest trends, but when I was in high school, I could identify peoples locations who were having a conversation with me on yahoo msgr by checking the data packets stats.

    But whether some new web 2.0 guy has created a new awareness abt location privacy in these years is something you should check out 😛

    Akhil Ravidas

    June 29, 2010 at 12:28 pm

    • as i said the data packets seem to go like its a P2P connection .. its how VoIP works i guess 🙂 ..

      Sathya Narayanan

      June 29, 2010 at 12:59 pm

  2. you are right.. voice in skype works that way(communist 😛 😛 ) for sure, i know a friend working on accounting skype behaviour as a part of his work 🙂

    Karthik Narayan

    June 29, 2010 at 11:45 pm

    • yeah .. pidgin uses jingle for VoIP and that also works the same it seems .. awesome 🙂

      Sathya Narayanan

      June 30, 2010 at 6:53 am

  3. Hi,

    I had observed a similar thing with google talk (when exchanging files with both the clients in the same subnet).
    In the case of google’s chat service, there are two channels where in one channel is used as a session control channel which is used to maintain the details of the session and this is through an intermediary server (google’s server, in the case of google talk), and the other channel acts as a direct (P2P sort of) connection between the clients through with the actual data (audio, video, etc..) is transferred, and hence the greater transfer speed between them.
    I presume, other IMs follow the same design. Also, it is not linux specific, it depends on the design of the messenger service, I guess.. 😉

    Vyas

    October 31, 2010 at 12:35 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: