Skip to content

Commit 23f46fa

Browse files
committed
upload 0915 0916 log about link layer and IPv4
1 parent f713321 commit 23f46fa

239 files changed

Lines changed: 12860 additions & 1340 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/posts/0915.md

Lines changed: 144 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,147 @@
11
+++
22
date = '2025-09-17T23:42:14+08:00'
3-
draft = true
4-
title = '0915'
3+
draft = false
4+
title = '0915学习日志'
5+
6+
categories="log"
7+
8+
tags=["计算机网络","局域网","IEEE 802.3","IEEE 802.11","IEEE 802.1Q帧","以太网","以太网交换机"]
9+
510
+++
11+
12+
## 计算机网络
13+
14+
### 局域网
15+
16+
1. 局域网的基本概念和体系结构
17+
* 主要特点:
18+
1. 为一个单位所拥有,其地理范围和站点数量均有限
19+
2. 所有站点共享较高的总带宽
20+
3. 较低的时延和较低的误码率
21+
4. 各站点为平等关系而非主从关系
22+
5. 能进行广播和多播
23+
* 三种特殊的局域网拓扑
24+
1. 以太网
25+
2. 令牌环(Token Ring)
26+
3. FDDI:逻辑拓扑环形结构,物理拓扑是双环结构
27+
28+
2. 以太网与IEEE 802.3
29+
* DIX Ethernet V2
30+
* IEEE 802.3
31+
32+
1. 以太网的传输介质与网卡
33+
34+
| 标准名称 | 10BASE5 | 10BASE2 | 10BASE-T | 10BASE-F |
35+
| ------------ | ---------------- | ---------------- | ------------ | --------------- |
36+
| 传输介质 | 同轴电缆(粗缆) | 同轴电缆(细缆) | 非屏蔽双绞线 | 光线对(850mm) |
37+
| 编码 | 曼彻斯特编码 | 曼彻斯特编码 | 曼彻斯特编码 | 曼彻斯特编码 |
38+
| 拓扑结构 | 总线型 | 总线型 | 星形 | 点对点 |
39+
| 最大段长 | 500m | 185m | 100m | 2000m |
40+
| 最多节点数目 | 100 | 30 | 2 | 2 |
41+
42+
2. 以太网的MAC地址:6字节,具体分配方式如下表
43+
44+
| 厂商代码 | 自行分配的适配器编号 |
45+
| :------: | :------------------: |
46+
| 高24位 | 低24位 |
47+
48+
* 单播帧
49+
* 广播帧
50+
* 多播帧
51+
52+
MAC帧的首部:
53+
54+
1. (6字节)目的MAC地址
55+
2. (6字节)源MAC地址
56+
3. (2字节)类型:交付上层协议
57+
58+
MAC帧的尾部:
59+
60+
1. (四字节)FCS:校验码
61+
62+
3. IEEE 802.11 无线局域网
63+
64+
1. 无线局域网的组成
65+
66+
1. 有固定基础设施无线局域网
67+
2. 无固定基础设施无线局域网:自组网络(ad hoc network)
68+
69+
2. 802.11 局域网的MAC帧
70+
71+
1. (30字节)MAC首部
72+
73+
| MAC首部组成部分(按序) | 字节数 |
74+
| :---------------------- | :----: |
75+
| 帧控制 | 2 |
76+
| 持续期 | 2 |
77+
| 地址1 (接收地址) | 6 |
78+
| 地址2 (发送地址) | 6 |
79+
| 地址3 (视情况而定) | 6 |
80+
| 序号控制 | 2 |
81+
| 地址4 | 6 |
82+
83+
| 帧控制组成部分 | bit位数 |
84+
| -------------- | :-----: |
85+
| 协议版本 | 2 |
86+
| 类型 | 2 |
87+
| 子类型 | 3 |
88+
| 去往AP | 1 |
89+
| 来自AP | 1 |
90+
| 更多分片 | 1 |
91+
| 重试 | 1 |
92+
| 功率管理 | 1 |
93+
| 更多数据 | 1 |
94+
| WEP | 1 |
95+
| 顺序 | 1 |
96+
97+
| 去往AP | 来自AP | 地址1 | 地址2 | 地址3 |
98+
| ------ | ------ | ----------------- | --------------- | -------- |
99+
| 1 | 0 | 接收地址=AP地址 | 发送地址=源地址 | 目的地址 |
100+
| 0 | 1 | 接收地址=目的地址 | 发送地址=AP地址 | 源地址 |
101+
102+
103+
104+
2. 帧主体
105+
106+
3. (4字节)FCS帧校验序列
107+
108+
4. VLAN基本概念与基本原理
109+
110+
* 802.1Q帧
111+
112+
| 目的地址 | 源地址 | VLAN标签 | 类型 | 数据 | FCS |
113+
| :------: | :----: | :------: | :--: | :-------: | :--: |
114+
| 6B | 6B | 4B | 2B | 46B-1500B | 4B |
115+
116+
### 广域网
117+
118+
1. 基本概念
119+
120+
2. PPP协议(点对点链路控制协议)
121+
122+
* 用户需要连接到某个ISP
123+
* 广域网路由器之间的专用线路
124+
125+
1. LCP:链路控制协议
126+
2. NCP:网络控制协议
127+
3. 一种将IP数据报封装到串行链路的方法
128+
129+
130+
131+
### 数据链路层设备
132+
133+
1. 网桥
134+
2. 以太网交换机
135+
1. 原理和特点
136+
2. 自学习功能
137+
3. 共享式以太网和交换式以太网的对比
138+
* 集线器不隔离广播域、冲突域
139+
* 交换机不隔离广播域、隔离冲突域
140+
141+
142+
143+
144+
145+
146+
147+

content/posts/0916.md

Lines changed: 120 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,123 @@
11
+++
22
date = '2025-09-17T23:42:18+08:00'
3-
draft = true
4-
title = '0916'
3+
draft = false
4+
title = '0916学习日志'
5+
6+
categories="log"
7+
8+
tags=["计算机网络","网络层"]
9+
510
+++
11+
12+
## 计算机网络-网络层
13+
14+
### 网络层的功能
15+
16+
1. 异构网络直连
17+
2. 路由与转发
18+
1. 路由选择
19+
2. 分组转发
20+
3. 网络层提供的两种服务
21+
1. 虚电路
22+
2. 数据报
23+
4. SDN(软件定义网络)
24+
5. 拥塞控制
25+
26+
### IPv4
27+
28+
1. IPv4分组
29+
30+
1. 格式
31+
1. (0-3,4b)版本
32+
2. (4-7,4b)首部长度:4B为单位
33+
3. (8-15,8b)区分服务
34+
4. (16-31,16b)总长度
35+
5. (32-47,16b)标识
36+
6. (48-51,4b)标志
37+
7. (52-63,12b)片位移:8B为单位
38+
8. (64-71,8b)生存时间TTL
39+
9. (72-79,8b)协议
40+
10. (80-95,16b)首部校验和
41+
11. (96-127,4B)源IP地址
42+
12. (128-159,4B)目的IP地址
43+
2. IP数据报分片
44+
45+
2. IPv4地址与NAT
46+
47+
1. IPv4地址
48+
49+
1. A类
50+
51+
| 网络号 | 主机号 |
52+
| -------------------------- | ------------------------------------------------------------ |
53+
| 8bit(0xxx xxxx, 01H - FEH) | 24bit(00 00 01H-FF FF FEH,00 00 00H为网络地址,FF FF FF为广播地址) |
54+
55+
2. B类
56+
57+
| 网络号 | 主机号 |
58+
| -------------------------------------- | -------------------- |
59+
| 16bit(10xx xxxx xxxx xxxx,8000H-BFFFH) | 16bit(00 01H-FF FEH) |
60+
61+
3. C类
62+
63+
| 网络号 | 主机号 |
64+
| -------------------------------------------------------- | ------------- |
65+
| 24bit(110x xxxx xxxx xxxx xxxx xxxx,C0 00 00H-DF FF FFH) | 8bit(01H-FEH) |
66+
67+
4. D类
68+
69+
| 1110 | 多播地址 |
70+
| ---- | -------- |
71+
72+
5. E类
73+
74+
| 1111 | 保留为今后使用 |
75+
| ---- | -------------- |
76+
77+
2. 网络地址转换NAT
78+
79+
3. 划分子网与路由聚合
80+
81+
1. 划分子网
82+
2. 子网掩码和默认网关
83+
3. 无分类编址CIDR
84+
4. 路由聚合
85+
86+
4. 网络层转发分组过程
87+
88+
(目的网络地址,下一跳地址)
89+
90+
1. 首部提取目的IP
91+
2. 特定主机路由查询,命中转发否则继续执行3
92+
3. 最长子网掩码匹配,命中转发否则继续执行4
93+
4. 若存在默认路由,则转发至默认路由;否则,报告转发分组出错
94+
95+
注:自始至终不会修改IP地址,而是修改MAC地址
96+
97+
5. 地址解析协议ARP
98+
99+
6. 动态主机配置协议DHCP(应用层协议)
100+
101+
1. DHCP客户广播”DHCP发现“消息,寻找网络中的DHCP服务器
102+
2. DHCP服务器收到”DHCP发现“,广播”DHCP提供“消息
103+
3. DHCP客户收到”DHCP提供“消息,若接受,广播”DHCP请求“
104+
4. DHCP服务器广播”DHCP确认“消息,将IP地址分配给DHCP客户
105+
106+
7. 网际控制报文协议ICMP
107+
108+
1. ICMP差错报告报文
109+
1. 终点不可达
110+
2. 源点抑制
111+
3. 时间超过
112+
4. 参数问题
113+
5. 改变路由
114+
115+
2. 以下情况不发送差错报告报文
116+
1. 对ICMP差错报告报文
117+
2. 对第一个分片的数据报片的所有后续数据报片
118+
3. 对就有多播地址的数据报
119+
4. 特殊地址
120+
121+
122+
123+

public/categories/diary/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ <h2 class="widget-title section-title">Archives</h2>
280280
<a href="/npee_learning_log.github.io/page/archives/#2025-09">
281281

282282
<span class="year">2025-09</span>
283-
<span class="count">14</span>
283+
<span class="count">16</span>
284284

285285
</a>
286286
</div>
@@ -341,7 +341,7 @@ <h2 class="widget-title section-title">Tags</h2>
341341
英语
342342
</a>
343343

344-
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/" class="font_size_4">
344+
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/" class="font_size_6">
345345
计算机网络
346346
</a>
347347

public/categories/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ <h2 class="widget-title section-title">Archives</h2>
280280
<a href="/npee_learning_log.github.io/page/archives/#2025-09">
281281

282282
<span class="year">2025-09</span>
283-
<span class="count">14</span>
283+
<span class="count">16</span>
284284

285285
</a>
286286
</div>
@@ -341,7 +341,7 @@ <h2 class="widget-title section-title">Tags</h2>
341341
英语
342342
</a>
343343

344-
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/" class="font_size_4">
344+
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/" class="font_size_6">
345345
计算机网络
346346
</a>
347347

@@ -392,7 +392,7 @@ <h1 class="section-term">Categories</h1>
392392
<div class="article-details">
393393
<h2 class="article-title">Log</h2>
394394
<footer class="article-time">
395-
<time datetime='2025-09-17T23:42:11&#43;08:00'>Sep 17, 2025</time>
395+
<time datetime='2025-09-17T23:42:18&#43;08:00'>Sep 17, 2025</time>
396396
</footer>
397397
</div>
398398
</a>

public/categories/index.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<description>Recent content in Categories on shyの考研日志</description>
77
<generator>Hugo -- gohugo.io</generator>
88
<language>zh-cn</language>
9-
<lastBuildDate>Wed, 17 Sep 2025 23:42:11 +0800</lastBuildDate><atom:link href="https://auroraemiya.github.io/npee_learning_log.github.io/categories/index.xml" rel="self" type="application/rss+xml" /><item>
9+
<lastBuildDate>Wed, 17 Sep 2025 23:42:18 +0800</lastBuildDate><atom:link href="https://auroraemiya.github.io/npee_learning_log.github.io/categories/index.xml" rel="self" type="application/rss+xml" /><item>
1010
<title>Log</title>
1111
<link>https://auroraemiya.github.io/npee_learning_log.github.io/categories/log/</link>
12-
<pubDate>Wed, 17 Sep 2025 23:42:11 +0800</pubDate>
12+
<pubDate>Wed, 17 Sep 2025 23:42:18 +0800</pubDate>
1313

1414
<guid>https://auroraemiya.github.io/npee_learning_log.github.io/categories/log/</guid>
1515
<description></description>

public/categories/interests/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ <h2 class="widget-title section-title">Archives</h2>
280280
<a href="/npee_learning_log.github.io/page/archives/#2025-09">
281281

282282
<span class="year">2025-09</span>
283-
<span class="count">14</span>
283+
<span class="count">16</span>
284284

285285
</a>
286286
</div>
@@ -341,7 +341,7 @@ <h2 class="widget-title section-title">Tags</h2>
341341
英语
342342
</a>
343343

344-
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/" class="font_size_4">
344+
<a href="/npee_learning_log.github.io/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C/" class="font_size_6">
345345
计算机网络
346346
</a>
347347

0 commit comments

Comments
 (0)