[root@linux ~]# route [-n] 參數: -n : 將主機名稱以 IP 的方式顯示 範例: [root@linux ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 192.168.0.254 0.0.0.0 UG 0 0 0 eth0 [root@linux ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 eth0 # 上面輸出的資料共有八個欄位,您需要注意的有幾個地方: # Destination :其實就是 Network 的意思; # Gateway :就是該介面的 Gateway 那個 IP 啦!若為 0.0.0.0 表示不需要額外的 IP; # Genmask :就是 Netmask 啦!與 Destination 組合成為一部主機或網域; # Flags :共有多個旗標可以來表示該網域或主機代表的意義: # U:代表該路由可用; # G:代表該網域需要經由 Gateway 來幫忙轉遞; # H:代表該行路由為一部主機,而非一整個網域; # Iface :就是 Interface (介面) 的意思。
主机路由详细说明
最新推荐文章于 2023-12-17 22:34:30 发布