networking - Does Skype determine which user on ones contact list is connected over the same network?

05
2014-04
  • Bleeding Fingers

    This has happened several times with me. If I am talking (call) to someone on Skype who also happens to be over my inranet/LAN and both of us are using the same internet, even if the internet for some reason goes down (Skype logo in the system tray shows the spinning arrow, page requests failing on the browser etc) the Skype call doesn't experience any interruption and runs smoothly as if nothing has happened. Same observation was given by the one with whom I was talking (call) to while on the call.

    Does this observation point to the fact that Skype somehow scans the local network to which the user is connect and if the contact with whom (s)he is talking to is also on the same network then the call is routed over the LAN rather then the internet?

    Does Skype officially state that it does that or am I missing something?

  • Answers
  • Ron

    Each Skype client reports its own IP address to Skype servers. When you place a call, your PC opens a connection directly to the called PC. The Skype servers just set up the call, telling each of you what the other end's IP address is -- all voice and video traffic flow directly between the two PCs


  • Related Question

    networking - Do VoIP packets travel through the internet link in LAN calls?
  • Jader Dias

    or do they leave the LAN if they don't really need to?

    If both parties in a call are in the same LAN, does the SIP/Skype call voice packets travel in and out through the internet?

    If so, how do I to avoid it? I want to save bandwidth and improve call quality.

    I know that with SIP the control packets must reach the controller, which is remote more often than not, but the actual voice packets can travel in a P2P connection, without leaving the LAN. What I am not sure is how to make it work, and if the same thing can happen to Skype.


  • Related Answers
  • MaQleod

    It may vary by protocol, but since you specified SIP and Skype in your tags, I will specify based on those particular terms.

    SIP is session based, so once a session is created between two points (by way of a SIP server), the actual RDP packets that carry the RTP audio stream travel only between the two points, so if this is on a LAN, once the SIP server (wherever that may be) initiates the connection between the two points, it backs out until it receives requests from either of the phones (such as a transfer or a bye). The voice packets at this point will never leave the LAN.

    As far as Skype is concerned, it is not SIP, it is a proprietary protocol that is closed source. I am honestly not sure how this protocol works, but I would surmise that it is similar (redirecting all voice traffic through a server puts HEAVY loads on that server and that connection which I would think would cost a company far more than it is worth to deal with as there are relatively few advantages to doing so).

  • Dolph

    While it's possible, it's not likely. There are a few simple ways you can tell for sure.

    First, do a traceroute from one client to the next to make surethe network is configured properly. If traceroute packets are leaving the LAN, somethig is seriously misconfigured.

    Next, start a VoIP call. After the call has started, physically pull the plug on your WAN connection, being sure to leave your LAN up and running. If the call is not dropped, the packets are isolated to your LAN. If the call is dropped, they're definitely being routed innefficienty.

  • indiv

    I don't know the definite answer, but I'd suspect yes, Skype will use your LAN. It's a trivial check and I see no reason why the Skype people wouldn't have put it in their app.

    1. Skype will contact the supernode over TCP to set up the connection.

    2. The supernode will see that both PCs are behind a NAT on your LAN, and there's certainly a port-restricted firewall in the way. Typically this would mean the supernode must route traffic between nodes. But the super node can see that both PCs have the same public IP address.

    3. The supernode tells your PCs to send audio (over UDP) to each other's internal NAT addresses and see what happens. It will only do this because they have the same public IP address. If successful, the PCs will communicate directly. Otherwise, the fallback is to use the supernode to route audio.

    Like I said, I don't definitively know what Skype does, but I've worked on (as in implemented in C++) VoIP systems before and know it's a simple optimization.

    Here are some forum threads that have mixed opinions on whether direct LAN routing works. I'd suspect it doesn't work all the time for whatever reason based on the mixed opinions.

  • TFM

    Although voice packets can be send over a P2P connection in a LAN, the caller in this case is using a third party (Skype servers) to find and connect to the recipient. In other words, Skype is seeing the caller's and recipent's WLAN addresses. The LAN addresses are only visible to the internet router, so Skype servers can never see them.

    Thus, the P2P connection can only be established between two WLAN addresses.

  • Chris Nava

    I think you would need to use a program that expects direct LAN connections to do this. For example iChat can do bonjour which doesn't require an internet based server to proxy the connections.

    I suspect that any service-based VOIP you will find will not have the ability to go direct over the LAN. Not at least, without a LAN based "corporate" server as the proxy.