Cisco 的「管理距離」、「路由度量」在 Linux/Windows 也有對應實作。掌握本質,跨平台知識互通無障礙。
| 概念 | Cisco IOS | Linux (iproute2) | Windows |
|---|---|---|---|
| 路由表 | show ip route | ip route show table main | route print / netsh interface ip show route |
| 預設路由 | ip route 0.0.0.0 0.0.0.0 next-hop | ip route add default via next-hop | route add 0.0.0.0 mask 0.0.0.0 next-hop |
| 策略路由 | route-map + set ip next-hop | ip rule + ip route table <id> | netsh routing ip add persistentroute / 策略路由較弱 |
| 管理距離 | Administrative Distance | 路由協議優先級 (metric) + 表優先級 | Interface Metric + 協議優先級 |
| 度量 | Metric (cost, hop, bandwidth...) | Metric (kernel 計算) | Metric (hop count 為主) |
ip rule 可實現 Cisco PBR 同等功能,甚至更靈活(fwmark、namespace)。技術演進是堆疊,而非推倒重來。掌握歷史脈絡,新特性自然迎刃而解。