Evanescent Thoughts

Evanescent Thoughts

Archive for the ‘Magic’ Category

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: 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: and wlan0:

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

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 and and create 2 different accounts and make a video call from one account to another . Now I thought the connection on was supposed to handle the traffic for both the comps and forward the packets from internet for 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 and without a single packet being sent to the outside network (

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 on eth0 and 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 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 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 😛


Written by Sathya Narayanan

June 29, 2010 at 9:33 am

The Private Magic Show at Sun Lab

with 5 comments

Today was one of my lucky days . I was in sun lab with my laptop , and had gone out for dinner . When I came back , was  surprised to see abhilash with a set of cards and AJ sitting in front of him . I went shouting “Hey me too , for the magic trick ” . And hence the private magic show of AJ began in the sun lab , with abhilash ,me and srinivas watching him do amazing things with cards .

I was a bit late , had missed a trick . So i  pulled a chair and sat down and the next half an hour was breath-taking . I have watched  lots of videos of David  Blaine’s Street magic . I was amazed at those tricks at first but was convinced at times that they were all fake . But this one by AJ totally blew my minds off. I happened to see abt 7-8 of his card tricks and i was really amazed to see how a couple of hands , a mouth and a pack of cards could take you out for an awesome entertaining journey. And then finally , he made me do all the magic. I am gonna explain this .

AJ  : So you wanna do some magic ?

Me :  Ofcourse yeah .

He then gave me a deck of cards and then,

AJ : Now you are the magician . As a magician what would you want me to do ?

Me : Pick a card ( I couldnt think of anything else )

AJ Picked a card randomly , I was holding the deck all the time . And then he asked me to shuffle the cards . Now I did all possible shuffling to make sure he was not cheating . And then he asked me do deal  a set of cards  of my own choice . So i arbitly cut a  few of cards . While he still had the card which he originally chose , I divided the cards I dealt into two sets .

AJ : Now the first deck gives me the  value and the second card gives me the suit.

And then voila !! He opened the first card of first deck . Turned out to be  Queen of Spades. Opened the first card of the other deck , which turned out to be Six Dice . And then he opened the card that he had initally taken . Believe me or not , it was a Queen of dice 🙂 . I was like OMG . He had not touched the entire deck of cards except for choosing the first card. I dealt all the cards, shuffled them all up myself. And still this guy pulls off a beautiful trick and amazes me ( and still says I ‘am the magician 😛 ) .

I feel really lucky to have been the one of very few to get his private magic show . I have seen some of my friends do magic tricks , but this one just blew me off. Totally entertaining.

Hats off AJ . You totally rock !!! .

PS : AJ you are “deeeeee”  magician  😛

Written by Sathya Narayanan

March 16, 2009 at 10:25 pm