Supplement · Networking
Namespaces, interfaces và sockets
Network namespace cô lập interfaces, routes, firewall và sockets; container networking là composition của các primitive này.
Linux internals
Virtual topology
Veth là cặp interface nối hai namespace; bridge chuyển frame giữa ports; route đưa traffic qua gateway; tunnel bọc packet trong packet. Namespace không tự cung cấp Internet: cần route, forwarding và thường SNAT.
Socket và kernel path
Socket được nhận diện bởi protocol/local/remote tuple. bind, listen, accept và connect chuyển state; file descriptor limit và listen queues đặt capacity. SO_REUSEPORT phân phối flows giữa listeners nhưng không thay thế backpressure.
Evidence map
| Câu hỏi | Công cụ |
|---|---|
| Interface/address? | ip -br link/address |
| Route thực tế? | ip route get, ip rule |
| Socket/queue? | ss -lntp, ss -ti |
| Kernel counters? | nstat, ethtool -S |