简体   繁体   中英

How is data shared across ip address

I'm not sure I've phrased the question correctly but I'll explain a bit more.

I have a server running on a virtual machine on PC1. I can access this through a particular IP address on the same computer. Now on a different PC2, when I try the same IP address I see the content served by PC1's server. Both computers are on the same network.

I don't really understand how that IP address is serving the same info on PC2. I'm not sure of the mechanics in the background either and it would really help if someone could explain what's happening here.

If you are using a wifi network then it is because of it you can access the content of the server you have created.

You can see the architecture as that of the internet but on a small scale. Your IP addresses are stores in the wifi (routing tables) so that it can send packets accordingly (See hoping and packet transmission). To be precise, each and every individual system maintains a routing table in it. Thus, in order to fetch a particular site, a system sees its routing table. If the particular IP address is present, the router returns it and the system shows that page. On the contrary, if the IP address is not present the router asks the nearby systems/servers for that particular IP address and the phenomenon continues till the IP address is found.

So, when you search for a local server via system B, whose data is in system A, then the router requests all its child systems to search for the particular IP address in their routing tables, and thus you can access the local server via systems connected on the same network.

To add furthermore, since the local servers are known to be locally operated, the router just sends the seek requests to its child systems only and not globally.

I have tried to keep it as simple as possible supposing that you have not learned about computer networks yet.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM