> For the complete documentation index, see [llms.txt](https://docs.1l.lol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.1l.lol/computer-basics/storage-and-network.md).

# 计算机存储与网络

### 存储器分类

| 类型    | 全称      | 特点                     |
| ----- | ------- | ---------------------- |
| RAM   | 随机存储器   | 可读可写，断电后数据**丢失**，即“内存” |
| ROM   | 只读存储器   | 只能读出，断电后数据**保留**       |
| Cache | 高速缓冲存储器 | 速度最快、容量小，位于 CPU 与内存之间  |

访问速度：**Cache > 内存(RAM) > 外存(硬盘)**；容量一般相反。

### 计算机网络的分类

* **局域网 LAN**：范围小，如一个机房、一栋楼
* **城域网 MAN**：一个城市范围
* **广域网 WAN**：跨城市、跨国，互联网属于 WAN

### 网络分层模型

* **OSI 七层**：物理层、数据链路层、网络层、传输层、会话层、表示层、应用层
* **TCP/IP 四层**：网络接口层、网络层、传输层、应用层

常见协议：IP（网络层）、TCP / UDP（传输层）、HTTP / FTP / SMTP（应用层）。

### IP 地址与子网

IPv4 地址是 32 位二进制，通常写成点分十进制，如 `192.168.1.1`。由**网络号**和**主机号**组成。子网掩码用于划分网络号，例如 `255.255.255.0`（即 /24）。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.1l.lol/computer-basics/storage-and-network.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
