Linux的路由表詳細(xì)介紹
發(fā)布日期:2022-06-04 12:01 | 文章來源:源碼中國
Linux的路由表詳細(xì)介紹
一 在Linux下執(zhí)行route命令
[root@localhost backup]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 enp0s3 192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0 [root@localhost backup]# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default gateway 0.0.0.0 UG 100 0 0 enp0s3 192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 enp0s3 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
二 route命令詳解
1、命令語法
route [-n] 選項與參數(shù): -n:將主機名以IP方式顯示
2、查詢結(jié)果分析
Destination :其實就是Network的意思。
Gateway :就是該接口的Gateway的IP,若為0.0.0.0,表示不需要額外的IP。
Genmask :就是Netmask,與Destination組合成一臺主機或網(wǎng)絡(luò)。
Flags :共有多個標(biāo)志可以來表示該網(wǎng)絡(luò)或主機代表的意義。
U:代表該路由可用。
G:代表需要經(jīng)過Gateway來幫忙傳遞。
H:代表該行路由為一臺主機,而非一個網(wǎng)絡(luò)。
Iface :就是interface(接口)的意思。
以上就是對Linux 路由表的詳解,如有疑問請留言或者到本站社區(qū)交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!
版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。
相關(guān)文章
關(guān)注官方微信