Hey there Guys!
I don't really interact with networking very much and, thus, realized I ultimiately don't know how a lot of communications work.
To my understanding; with a normal connection to a website from a computer:
- The computer sends a packet to the router instructing it wants to go to example.com
A few questions then:
0.) Is this even correct?
1.) When the router ultimiately sends to an IP, what is happening here? How does it know which 'direction' to send the message to based on the IP? What does it do with this IP?
2.) What happens if, later, the server wants to talk to that computer in the internal network? Would that port have to be open/routed for it to connect, since the server ultimiately has no idea of 'who' it is communicating with other than that external IP? Can it just not do it?
Connected to that question is a scenario for another question that kind of shows my misunderstanding/confusion:
3.) If one system has software for being remote controlled and the other has software for controlling a system, how does one know that the other is online? Is this just done through a 3rd party server that each application keeps polling to see if one or the other is online? E.g. in the case that you can see the computer is online from the remote control software.
4.) I don't see a way that two computers, both with hidden internal network IPs, only showing external can talk to each other without some 3rd party being involved and constant polling, or port forwarding being set up on the router (which I don't see/notice in the software used)
5.) Is it just a case that when the controller, on one network, selects to 'connect' to the other computer it's really being facilitated through a 3rd party server that will pass along ports to use, etc? If this is the case, are there ways to do it without it?
6.) If there are two computers on two different networks, without any applications or 3rd party servers involved, could they interact with each other? Presumably you'd have to know the internal IP and there is some way to tell the router just to send your data there directly, etc?
Sorry for the block of text; hopefully I've not made a fool of myself here with the somewhat basic questions but it's not something I've thought about until now and I've never studied networking.
Thanks in advance,
SinPi
I don't really interact with networking very much and, thus, realized I ultimiately don't know how a lot of communications work.
To my understanding; with a normal connection to a website from a computer:
- The computer sends a packet to the router instructing it wants to go to example.com
- The router assigns a port to the connection and sends the packet out to a DNS server asking where example.com is
- The whole DNS thing happens, which is fun in itself, and then eventually the information to the IP address of example.com is returned
- Message is sent to that IP
- The message includes the ports that a communication should be received on
- The website responds to the message, sending the message back via the specified port
- Because it came on that port, the message is routed from the server to the computer on the internal network
A few questions then:
0.) Is this even correct?
1.) When the router ultimiately sends to an IP, what is happening here? How does it know which 'direction' to send the message to based on the IP? What does it do with this IP?
2.) What happens if, later, the server wants to talk to that computer in the internal network? Would that port have to be open/routed for it to connect, since the server ultimiately has no idea of 'who' it is communicating with other than that external IP? Can it just not do it?
Connected to that question is a scenario for another question that kind of shows my misunderstanding/confusion:
3.) If one system has software for being remote controlled and the other has software for controlling a system, how does one know that the other is online? Is this just done through a 3rd party server that each application keeps polling to see if one or the other is online? E.g. in the case that you can see the computer is online from the remote control software.
4.) I don't see a way that two computers, both with hidden internal network IPs, only showing external can talk to each other without some 3rd party being involved and constant polling, or port forwarding being set up on the router (which I don't see/notice in the software used)
5.) Is it just a case that when the controller, on one network, selects to 'connect' to the other computer it's really being facilitated through a 3rd party server that will pass along ports to use, etc? If this is the case, are there ways to do it without it?
6.) If there are two computers on two different networks, without any applications or 3rd party servers involved, could they interact with each other? Presumably you'd have to know the internal IP and there is some way to tell the router just to send your data there directly, etc?
Sorry for the block of text; hopefully I've not made a fool of myself here with the somewhat basic questions but it's not something I've thought about until now and I've never studied networking.
Thanks in advance,
SinPi