Hi Kostya, all very good and informative points - thanks.
I do know the definition of the loopback in the TCP/IP stack ;) Actually my effort here is to solve the NAT problem using P2P technologies on the Android device. I am importing JXTA in Android and I am using a public rendezvous/relay to traverse the NAT across nodes. Let me ask this instead - from Node A (pc) to Node B (pc) across LANs that are NATed, JXTA can route packets between them. I can use real devices in the place of PCs (real Android devices) and most likely I can traverse the NAT as well. But how does the emulator, which defines a virtual router differs from this? If at all ... If the pc it is sitting on can see the public relay then will I need to have the pc forward the port it is listening on so that the packets can reach the emulator? In other words, do I deal with two consecutive NATed routers or just one when I have a pc in a NATed LAN and an emulator running on it .. hope this makes a bit more sense. My second question was a bit simpler - why is my app on the emulator printing the loopback address and not its IP address? Thanks On Aug 17, 4:14 pm, Kostya Vasilyev <[email protected]> wrote: > Loopback is always 127.0.0.1 - by definition. That is a TCP/IP thing, not an > Android thing. > > As for connecting emulators on two systems - I think it's not easy to make > it work, if at all possible, since the emulator is likely to NAT its network > connections, and traversing a NAT in the inbound direction takes some > effort. > > The usual rules for NAT should apply - emulator A would have to connect to > the real IP address on machine B, and then you'd have to find a way to > forward certain incoming connections on machine B to your application > running inside emulator B. > > Having same addresses inside both emulators doesn't matter, since they are > not visible from the outside. > > However, this setup is likely to work in the real world very poorly, or not > at all (except over Wifi). Cellular operators can NAT their data networks, > and then you won't be able to accept inbound socket connections. > -- > Kostya Vasilyev --http://kmansoft.wordpress.com > > 17.08.2010 23:00 пользователь "kypriakos" <[email protected]> написал: > > Hi all, > > looking over the online guide for the emulator and after some googling > i still have some > questions on this - the guide focuses on emulator instances running > on the same machine. > However, I was trying to see how that maps for emulator running in a > distributed fashion. > If a node A (with IP address 129.10.52.x) in LAN A is running Emulator > A (which will have > the default IP address of 10.0.2.15:portA) wants to communicate with a > emulator B (which will > also have the default IP address of 10.0.2.15:portB) running on node > B (with IP address > 129.10.53.x) in LAN B how is the port forwarding setup in this case? > The same way as if > both emulator were running on the same machine? > And why when I print the IP address of the emulator running on any of > the nodes what's > displayed is the loopback address 127.0.0.1 and NOT 10.0.2.15 which is > the IP address > that each emulator is assigned? > > Thanks > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group > athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

