主机路由详细说明

[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 (介面) 的意思。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值