Ethernet shield ChatServer example confusion

I have a few confusions regarding the ethernet shield. My sketch works totally fine but I have some confusion. Why is the sketch working without the internet as well? I have found that the sketch is working without a connection to the internet, so then how does the shield work? Does it makes its own network that works without the Internet??
Secondly, if my friend wants to chat using the same server using the IP address, will he be able to access that if he is in another country/city? If not then why?.
Finally, I want to ask what is the need for the gateway IP. In this case, I am not using an external router to act as a gateway, then why is it asking for it in this case??
Kindly help me clear my confusion as I am new to this shield and the internals of networking. My results are shown below where telnet was used in the command prompt

every device with a TCP/IP stack has a network. it has at least the loopback network interface. the TCP/IP stack can handle multiple network interfaces.

Internet is not required to run a network. Internet are interconnected TCP/IP networks. Gateways route traffic from local network to external network which maybe the Internet or just local too and the there is again a gateway. (Internet is a network of devices with valid Internet IP address)

your ChatServer is available over the Ethernet shield (Wiznet W5x00 IC with built in TCP/IP stack). The sketch uses DHCP protocol to get an IP address valid in the local network and the address of the gateway and then can communicate with other devices in the same local network or with the gateway.

the Arduino can access the external network (Internet) only over the gateway. A TCP/IP client from external network (Internet) can't reach the Arduino because the Arduino doesn't have an IP in the external network. (A getaway can be configured with some rules to route some traffic addressed to the IP of the gateway to the Arduino)

How can some other user enter into my network? Can this ethernet be used by another user? I have tried the webserver sketch which could only be accessed by me but not by another laptop next to me.

^^^

what are those rules? Can you guide me on how to do that on the shield or provide me some link? I shall be thankful. Actually, if the sensor values cannot be accessed over the internet using another phone/PC then what can the shield do? I don't want to see it on my pc only.

those are settings in your router. google it for your specific model

I am not using a router I am using my own PC network

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.