Page 1 of 1

LAN or Internet ???

PostPosted: Sun Oct 10, 2010 3:03 pm
by mmh166
When I listen to subsonic on my local network (the computer serving the files AND the computer playing the files are both on my home network), is the traffic taking my LAN or is it actually still traveling the net?

PostPosted: Fri Oct 29, 2010 4:01 am
by darklude
Same question ... if I setup my iphone (with iSubsonic) with my address provided by Subsonic ex.: http://"server name".subsonic.org is this going to use the WiFi (LAN) in first place (if my iphone is connected to the WiFi)
or it will use the 3GS and pass through the Internet ?

PostPosted: Fri Oct 29, 2010 5:31 am
by j3tblk
If you point your browser or mobile device's URL or IP to the public facing IP (example 65.10.67.110:777 or myserver.dyndns.org:777) Traffic will route out of your routers internet facing interface look up the public DNS records (or routing info) and the traffic will route back into your router (and depending on your config FW rules are applied\checked, QOS, PAT, NAT is applied etc)
If you point your config to the LAN IP the connection will traverse your LAN.

In short, if you point your device to a public IP or URL it will traverse the public Internet.
If you use your LAN IP it will not.
There are always exceptions and you could geek out and make exceptions with cool hardware, load balancers, firewalls, content caching so forth and so on but for most home networks what I described is what will occur.

I build global networks for a living.
Hope this helps.

PostPosted: Fri Oct 29, 2010 12:10 pm
by darklude
Hello j3tblk, thx for your good answer ! After a couple of tests yesterday, I've figured out the same thing like you've said !:)

PostPosted: Wed Nov 10, 2010 7:06 pm
by plowman
Just to clarify what j3tblk stated:

If your device is connected to your LAN (either wireless or wired) and NOT using 3G then the initial handshake and such (DNS lookup, etc.) will query the internet at large. However, even if you are using the externally facing address (something.subsonic.org) the data traffic will just HIT your router. It will not be pushing that streamed content data out to the internet and back. It will never really "leave" your LAN. Still all high-speed and such (given that most wireless routers will impose some serious limitations to LAN traffic speeds due their meager imbedded hardware).

PostPosted: Wed Dec 01, 2010 2:35 am
by mmh166
thanks, all, for the answers.

i discovered that i had bookmarked my external IP, so that when i visited subsonic from home and away, i was directed there...

when i used the subsonic address instead, it resolved it with internal and external IPs accordingly.

thx

PostPosted: Tue Jan 11, 2011 4:40 pm
by j3tblk
plowman wrote:Just to clarify what j3tblk stated:

If your device is connected to your LAN (either wireless or wired) and NOT using 3G then the initial handshake and such (DNS lookup, etc.) will query the internet at large. However, even if you are using the externally facing address (something.subsonic.org) the data traffic will just HIT your router. It will not be pushing that streamed content data out to the internet and back. It will never really "leave" your LAN. Still all high-speed and such (given that most wireless routers will impose some serious limitations to LAN traffic speeds due their meager imbedded hardware).


Nope. on Cisco hardware that traffic will indeed leave the outbound interface and then use the ISP's routing information (ACLS and FW rules applied) and traverse back in. Fire up a packet capture or modify the access lists on one of the interfaces. You will see the packets leaving and returning. Now if you are using an alternate routing protocol or different hardware this may not be the case but 99% of the time it will be. Test it for yourself.

PostPosted: Wed Jan 12, 2011 10:27 pm
by Josh Hawley
The DNS packets do go out onto the internet. They are only part of the initial connection process though.

Because the router is the delineation between the internet and your private lan, it is technically going on the internet. However, I bet if you look a little deeper you will find that your packets are going through the outbound NAT/ACL/etc then the interface send the packets to the proper IP (which is the external IP of the router) and then through the inbound NAT/ACL/etc. It is connecting to itself. So they don't go out onto the internet enough to be subject to any real security issues, and they do not consume your internet bandwidth because they are not going across any WAN links.

Your packets are about as public as your front porch. Its like you start in the living room, and step out onto the front porch and then back inside on the way to your kitchen.

PostPosted: Fri Jan 14, 2011 3:21 am
by j3tblk
Josh Hawley wrote:The DNS packets do go out onto the internet. They are only part of the initial connection process though.

Because the router is the delineation between the internet and your private lan, it is technically going on the internet. However, I bet if you look a little deeper you will find that your packets are going through the outbound NAT/ACL/etc then the interface send the packets to the proper IP (which is the external IP of the router) and then through the inbound NAT/ACL/etc. It is connecting to itself. So they don't go out onto the internet enough to be subject to any real security issues, and they do not consume your internet bandwidth because they are not going across any WAN links.

Your packets are about as public as your front porch. Its like you start in the living room, and step out onto the front porch and then back inside on the way to your kitchen.


Good analogy. & there will be more than just DNS packets traversing outside (everything will still work if you configure nothing but IP\port info.)
I'm bowing out of this thread. We've more than answered his question and there are always different configurations\hardware. Thanks guys.

PostPosted: Wed Jan 19, 2011 10:09 pm
by Riebart
This really depends on your setup. Linux+iptables based home routers (read: almost all of them) will not forward traffic out to the internet if you direct traffic at your internet-facing IP address. As was mentioned, it will simply hit it, but not traverse it. This is where it gets tricky: most of the time these routers have no idea what to do in this situation.

Because of how iptables works, the packets fall into the no-man's-land of the iptbables rules: the packets aren't coming from the WAN, so they do not get handed off to the WANIN iptables rule which means that port forwarding and whatnot does not get applied. This means that these packets usually die "on the front porch" to use an earlier analogy.

This can be resolved, but requires some more complicated setups. The idea here is that when a packet is seen as coming from the LAN and is headed for the WAN interface, iptables grabs it, and stuffs it down the WANIN chain so that the packet gets handled as though it was coming from the internet, even though it never actually reaches your ISP. When this is done, everything works perfectly! This is the setup I have running on my home network.