IPv4 子网划分
- 每个子网的主机数
- 2(32 − prefix) − 2 (/31: 2, /32: 1)
- 块大小
- 256 − (mask octet)
- 网络地址
- IP AND 掩码
- 广播地址
- IP OR (NOT 掩码):主机位全部置 1
- 借用 n 位得到的子网数
- 2n
公式表、每个专题的关键方法步骤和 6 道练习题,完整解答附在最后。
网络 172.20.0.0/16 被划分为前缀为 /22 的等大子网。共有多少个子网 N?
一台主机的地址为 172.20.127.3/19。其网络地址的第三个八位组 x 是多少?
分布式拒绝服务(DDoS)攻击的特征是什么?
在 TCP 连接中,接收窗口(rwnd)控制什么?
把 −90 写成 8 位补码模式。再把该模式当作无符号二进制数读出:它的十进制值 U 是多少?
一幅未压缩图像为 800 × 600 像素,每像素 32 位。它占用多少内存 M(以 KiB 计,1 KiB = 1024 字节)?
答案: N = 64
IPv4 subnetting: an address has 32 bits. The prefix /p says how many leading bits identify the network; the remaining 32 − p bits number the hosts. A subnet has 2³²⁻ᵖ addresses, but the first (network address) and last (broadcast address) cannot be given to hosts, so 2³²⁻ᵖ − 2 hosts fit. Exceptions: a /31 (point-to-point link, RFC 3021) uses both of its 2 addresses for hosts, and a /32 is one single address (a single host or a loopback).
每个 /22 子网有 210 − 2 = 1022 个可用主机。
答案: x = 96
IPv4 subnetting: an address has 32 bits. The prefix /p says how many leading bits identify the network; the remaining 32 − p bits number the hosts. A subnet has 2³²⁻ᵖ addresses, but the first (network address) and last (broadcast address) cannot be given to hosts, so 2³²⁻ᵖ − 2 hosts fit. Exceptions: a /31 (point-to-point link, RFC 3021) uses both of its 2 addresses for hosts, and a /32 is one single address (a single host or a loopback).
答案: A · 大量被攻陷的机器用流量淹没一个目标
在 DDoS 攻击中,许多来源压垮服务器或链路,使合法用户无法得到服务。来源众多使简单的封堵很难奏效。
答案: B · 根据接收方缓冲区,发送方可以发送多少未确认的数据
接收方通告其可用的缓冲区空间;发送方据此限制未确认的数据量,防止接收方过载。
答案: U = 166
位置计数制:每个数位的值等于该数字乘以基数的某次幂。二进制各位的权为 1、2、4、8、16、……;十六进制为 1、16、256、……,A–F 代表 10–15。在 8 位补码中,最左边一位的权是 −128 而不是 +128,负数就是这样存储的。
答案: M = 1875 KiB
位置计数制:每个数位的值等于该数字乘以基数的某次幂。二进制各位的权为 1、2、4、8、16、……;十六进制为 1、16、256、……,A–F 代表 10–15。在 8 位补码中,最左边一位的权是 −128 而不是 +128,负数就是这样存储的。
ExamProblems · examproblems.com/courses/computer-networks