Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[TCP] [Ports] Connecting Two Computers

 [1/8] from: Izkata:Comcast at: 2-Oct-2004 20:35


I think I asked this before, but couldn't find it... Alright, I found a TCP example of how to make 2 scripts communicate at http://www.rebol.net/cookbook/recipes/0028.html and it works fine for me. Then, when I try to modify it and make two different computers connect to each other, the Client side gets an error trying to connect to my IP Address. It can't find it or something.... And yeah, the Server part is running while this happens.. ** Access Error: Cannot connect to 192.168.1.100 ** Near: connect-out: open/direct/lines/no-wait tcp://192.168.1.100:9097 Server is still connecting to tcp://localhost:9097/ it seems like it should work, but if I'm waiting for another computer, does it? Also, I use a router... could that be a problem? (I'm retrieving my IP by using "Insert IP Address" in AIM)

 [2/8] from: antonr::lexicon::net at: 3-Oct-2004 16:15


Sure that's the ip address? Usually it's 192.168.0.x -Anton.

 [3/8] from: tomc::darkwing::uoregon::edu at: 3-Oct-2004 2:20


On Sat, 2 Oct 2004, Izkata wrote:
> I think I asked this before, but couldn't find it... > Alright, I found a TCP example of how to make 2 scripts communicate at
<<quoted lines omitted: 10>>
> Also, I use a router... could that be a problem? > (I'm retrieving my IP by using "Insert IP Address" in AIM)
are the two computers on the same subnet? is the router between the computers? is the router doing NAT? addresses that begin with 192.168.1.* or 10.0.0.* are "unroutable" (that is everyone with a lan uses the same sets of addresses so they are useless for the internet at large) your router may be able to shunt traffic on port 9097 to your computer running the server then the client will connect the routers ip. you can also open a dos shell and type ipconfig to get your machines ip. hope that helps

 [4/8] from: Izkata:Comcast at: 3-Oct-2004 15:02


> are the two computers on the same subnet? > > is the router between the computers?
Nope..
> is the router doing NAT?
What's NAT?? X^D
> addresses that begin with 192.168.1.* or 10.0.0.* are "unroutable" > (that is everyone with a lan uses the same sets of addresses so they are > useless for the internet at large) > > your router may be able to shunt traffic on port 9097 to your computer > running the server then the client will connect the routers ip. > > you can also open a dos shell and type ipconfig to get your machines ip.
Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 192.168.1.100 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1
> hope that helps >
lmao nope... I'm very, very confused....

 [5/8] from: ammon::johnson::gmail::com at: 3-Oct-2004 16:08


What is the IP information for the second machine? NAT: Network Address Translation --- Used for allowing mulitple machines to access the internet from the same IP address and for securing local subnets... On Sun, 3 Oct 2004 15:02:21 -0500, Izkata <[izkata--comcast--net]> wrote:
> > are the two computers on the same subnet? > >
<<quoted lines omitted: 21>>
> To unsubscribe from the list, just send an email to rebol-request > at rebol.com with unsubscribe as the subject.
-- Enjoy!! ~~Ammon ;~> ~Sui Generis~

 [6/8] from: Izkata::Comcast::net at: 3-Oct-2004 16:11


> What is the IP information for the second machine?
Well, mine: Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 192.168.1.100 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.1.1 Other (friend): Connection-specific DNS Suffix . : IP Address. . . . . . . . . . . . : 192.168.0.101 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.0.1 0.o They're almost the same.. that can't be normal, can it? My friend lives almost an hour away -and- has a different ISP... (MCI, I have Comcast)

 [7/8] from: ammon::johnson::gmail::com at: 3-Oct-2004 16:39


Actually, that is normal. You're both on private subnets and behind routers/firewalls. You need to make sure that the port that you are trying to connect on is open on both firewalls and routed to the proper machines. You also need to be connecting to the internet address (i.e. router address) for the machines and not the local address for the machines (i.e. 192.168.1.100 and 192.168.0.101) If you don't know the internet address for the machines then the first thing to do is to figure out what it is which can be done by simply visiting www.ipaddress.com from the machine you are trying to connect to. Once you know the internet address for the machines then just try connecting to the other machine via its internet IP Address. If that doesn't work then the machine you are attempting to connect to is behind a firewall and you will need to figure out how to get the the port that you are trying to connect on opened up and forwarded to the machine. HTH On Sun, 3 Oct 2004 16:11:34 -0500, Izkata <[izkata--comcast--net]> wrote:

 [8/8] from: tomc:darkwing:uoregon at: 3-Oct-2004 16:35


this answer implies at least your router is between the machines and your friends router as well. there are special ip addresses that are different from the normal addresses uaed by the internet. one such example is 127.0.0.1 which may be used by every machine when it wants to talk to itself. other *special* addresses are the that begin with 192.168.*.* they are reserved for small private networks, or LANs (local area networks). since there are millions of these small lans these addresses are ONLY valid within the lan they are in. you have a lan. your friend has a lan. both lans draw IP from the same range of non-routable addresses. you could easly both have the same 192.168.*.* address. machines can only send data to other machines on the same subnet. so your friends machine tried to connect to port 9097 on a machine on HIS (assuming your friend is a he) lan not YOUR lan. here is your situation as far as I can guess. (also assuming your email is sent by the same ISP) (notice the inside and outside IPs on both routers are similar to the ip of the machines they connect to) [you 192.168.1.100] | | | [your-router-inside 192.168.1.1] [your-router-outside 67.175.100.73] ;your (dynamic) IP | | | [your-ISP's-gateway 67.175.100.1](gateway typically *.1) | | | < the internet > | | | [friends-ISP's ?.?.?.?] | | | [friends-router-outside ?.?.?.?] ; friends dynamic IP [friends-router-inside 192.168.1.1] | | | [friends 192.168.1.101] for this to work: your friend would need to know your (dynamic IP) your router would need to know that when it got traffic on a particular port (9097) from the outside to forward to the non routable address 192.168.1.100 on its inside. for just starting out it may be easier for you to just put a second machine on your lan [you1 192.168.1.100] ---- <switch/hub> --- [you2 192.168.1.99] | | | [your-router-inside 192.168.1.1] [your-router-outside 67.175.100.73];your (dynamic) IP then they do not need the router to communicate because they are on the same subnet, you dont need to forward a port yet and you get to play. On Sun, 3 Oct 2004, Izkata wrote:

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted