程序员关于局域网的错误认知
Falsehoods Programmers Believe About LANs

原始链接: https://dreamstation.systems/personal/lanfalsehoods.html

这份列表列举了一系列常见的网络误区,并以错误陈述的形式呈现。它涵盖了局域网(LAN)管理的核心概念,强调了关于网络架构、协议行为及硬件识别等假设的脆弱性。 主要涵盖领域包括: * **NAT 与寻址:** 挑战了关于 NAT 是否存在、RFC 1918 使用情况以及 NAT 仅影响报头或地址转换的既定认知。 * **协议与 MAC 地址:** 指出网络流量鲜有简单的情况;MAC 地址常被认为是不可更改的全球唯一标识符,但实际上经常被仿冒、重复或重新分配。 * **连通性:** 破除了关于基于子网的可达性、Wi-Fi 与以太网等效性,以及 ARP 条目和 MTU 设置可靠性的迷思。 * **DHCP 与配置:** 动摇了关于 DHCP 服务器存在与否或其唯一性的假设,以及对租约地址或配置(如 DNS/网关)保持不变的预期。 总之,本文旨在为网络工程师提供警示,强调在现实环境中,“显而易见”的网络真理往往并不可靠,需要通过实证验证而非经验臆断来处理。

Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 程序员关于局域网(LAN)的错误认知 (dreamstation.systems) 11 分 提交者:robinpie 53 分钟前 | 隐藏 | 过往 | 收藏 | 讨论 | 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Each entry is phrased as the falsehood. Some of these may sometimes be true and sometimes be false.

NAT

  • My LAN is behind a NAT.
  • I’m only behind one NAT.
  • My LAN isn’t behind a NAT.
  • My IPv6 hosts aren’t behind a NAT.
  • If I have a RFC 1918 address, I’m behind a NAT.
  • If I don’t have a RFC 1918 address, I’m not behind a NAT.
  • NAT only translates addresses.
  • NAT only translates addresses and ports.
  • NAT changes nothing outside of the header.
  • NAT is only found on LANs.

Protocols

  • Only IPv4 is running on my LAN.
  • Only IP is running on my LAN.
  • Okay, only IP, IPX/SPX, Phase IV, AppleTalk, VINES, NetBEUI, or SNA are running on my LAN.
  • Seriously?
  • I can stop certain types of traffic from using my LAN.
  • I know what’s running on my LAN.

MAC addresses

  • MAC addresses are globally unique. (They’re supposed to be, but they aren’t.)
  • MAC addresses are locally unique.
  • Different MACs are different devices.
  • Okay, different MACs are different network interfaces.
  • MAC addresses can’t be changed.
  • MAC addresses can be changed.
  • MAC addresses are 48 bits.
  • The first three bytes are vendor‐unique.
  • The first three bytes are vendor‐unique if it’s a MA-L block.
  • MAC addresses are unicast.
  • Only one host answers an ARP request for a given IP.
  • ARP entries are accurate.

Reachability and performance

  • The LAN is fast.
  • The LAN is faster than the Internet.
  • Two hosts on the same subnet can reach each other without leaving the LAN.
  • Same subnet means two hosts can talk.
  • Wi-Fi and Ethernet clients are equivalent peers on the LAN.
  • Wi-Fi and Ethernet clients aren’t equivalent peers on the LAN.
  • Every device on my LAN has the same MTU.
  • Hostnames are locally unique.
  • mDNS works.

DHCP

  • There is a DHCP server.
  • There is one DHCP server.
  • My address won’t change while I’m using it.
  • The DHCP server and the gateway are the same device.
  • DHCP will give me a gateway.
  • DHCP will give me a DNS server.
  • 169.254.0.0/16 means DHCP failed.

IP addresses

  • Every host has one IP address.
  • My LAN uses RFC 1918 IP addresses.
  • My LAN uses private IP addresses.
  • My LAN uses IP addresses.
联系我们 contact @ memedata.com