Supplement · Networking

Link delivery và route selection

IP quyết định next hop; Ethernet giao frame tới next hop, không nhất thiết tới destination cuối.

L2/L3 Routing

L2: frame và neighbor

Switch học source MAC trong forwarding database. ARP (IPv4) hoặc Neighbor Discovery (IPv6) ánh xạ next-hop IP sang link-layer address. Neighbor state stale/failed, VLAN sai hoặc duplicate IP có thể trông như lỗi application.

L3: prefix và FIB

Host dùng longest-prefix match, sau đó metric/policy rule để chọn route. ip route get DEST cho biết quyết định hiệu lực gồm source và interface. Default gateway chỉ dùng khi không có prefix cụ thể hơn. Router giảm TTL/Hop Limit; ICMP báo nhiều lỗi path quan trọng.

Failure semantics

Hiện tượngGiả thuyếtEvidence
Local subnet timeoutARP/NDP, VLANip neigh, capture ARP
Một chiềuAsymmetric route/policyroute + capture hai đầu
Hop loopRoute recursionTTL exceeded, trace
Gói lớn failPMTU/ICMP blockedDF probe, ICMP capture

Nguồn chuẩn

← Mental modelTCP/UDP →