5

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.

5 Answers 5

1

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).

3

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.

2
  • 1
    In the second step the call can be dropped, not because the voice packets are using the WAN, but because the control packets are.
    – Jader Dias
    May 13, 2010 at 12:44
  • After the call has started, physically pull the plug on your WAN connection, being sure to leave your LAN up and running. I tried this with a running Skype call, and it continued to work as if nothing happened. I was able to mute, unmute and end the call without any difference in the user experience.
    – Hippo
    Dec 8, 2014 at 9:05
3

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.

1

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.

1
  • Some services are smart enough to only use the central server to coordinate the connection. The server can act as a "reflector" if it needs to, but if the two clients can talk directly it will tell them to do that instead. That's good for everyone: the clients have a better connections and it keeps the service provider's bandwidth bill in check. May 11, 2010 at 20:55
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .