> For the complete documentation index, see [llms.txt](https://ruang-feng.gitbook.io/deer-s/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ruang-feng.gitbook.io/deer-s/zheng-wen/recommended-mastery-skills/computer-communication-basics.md).

# 计算机通信基础

### 计算机通信基础

既然扯到了服务端上面了，你肯定要对通信基础有一定程度了解，不过也只是基础罢了。你不需要还专门为此买一本书，如果想买的话推荐《计算机网络-自顶向下方法》。其实这点东西对于真正的计算机通信基础来说真的太少了（IP协议某种意义上也算不上基础），很多真正的基础都没有讲到。

让我来做一些讲解： 首先是ip地址，什么是IP地址呢？用来在网络中标记一台电脑的一串数字就是IP地址，别的计算机传来数据就是通过ip地址。还有就是在本地局域网上是唯一的。它是由一串32个二进制数字组成的，有四组，一组八个数字，现在我们看到的ip地址都是转化成了十进制的。至于其他的就不做赘述。

我们再来讲解一下端口。先思考一个问题，一台计算机能够通过IP被找到，但是那么多的程序，那么目的主机应该把接收到的数据包传送给众多同时运行的程序中的哪一个呢？那么端口便诞生了，说到这里你应该你理解了。举个例子，如果你再内网要开MC服务器，那么我们映射的都是MC服务端端口25565。

再来谈一谈内外网，简单解释一下呢，内网可以解释为局域网，外网广义上可以解释为INTERNET。我举个例子，假如你在开mc服务器，如果你是内网开服，那么只有和你处于同一局域网的主机才能进入你的服务器，如果是外网的话整个INTERNET（因特网）内的主机只要在特定的客户端输入你的IP就可以成功进入的服务器。所以在内网内开服需要端口映射。 你要了解的东西在这里也差不多了，由于你只是做服务端，不需要了解太多。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ruang-feng.gitbook.io/deer-s/zheng-wen/recommended-mastery-skills/computer-communication-basics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
