作者noapaov (單身漢)
看板Linux
標題[問題] 關於路由的問題
時間Sun Apr 26 13:35:48 2015
關於路由的觀念有點不太清楚, 請問一下各位,
以下是我的路由表
Destination Gateway Genmask Flags Metric Ref Use Iface
112.xxx.xx.64 192.168.10.254 255.255.255.240 UG 0 0 0 eth0
203.xx.xx.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1003 0 0 eth1
0.0.0.0 203.xx.xx.254 0.0.0.0 UG 0 0 0 eth1
想請問
(1)
112.xxx.xx.64 192.168.10.254 255.255.255.240 UG 0 0 0 eth0
代表當前往目的地112.xxx.xx.64/255.255.255.240 是透過192.168.10.254 gateway出
去使用的是eth0介面
(2)
0.0.0.0 203.xx.xx.254 0.0.0.0 UG 0 0 0 eth1
代表當前往任一目的地 是透過203.xx.xx.254 gateway出去使用的是eth1介面
(3)
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
如果前往192.168.10.0/255.255.255.0 則不透過gateway, 同網域
(gateway 如果是0.0.0.0代表不通過gateway嗎)
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.34.181.227
※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1430026550.A.B6C.html
※ 編輯: noapaov (114.34.181.227), 04/26/2015 13:39:16
→ kenduest: 你都已經解釋了啊,看起來沒什麼問題 04/26 14:51
→ noapaov: 假設A電腦要連線到B電腦(HTTP server),AB不同網段 04/27 12:44
→ noapaov: A設定了前往B的路由, 那B也需要設定前往A的路由對嗎 04/27 12:44
→ noapaov: A是request, B是response 04/27 12:45
※ 編輯: noapaov (203.69.59.91), 04/27/2015 12:45:46
→ noapaov: B還需要透過路由表才可找到A嗎? 04/27 12:52
→ noapaov: 還是B可以直接透過A傳來的封包資訊,傳回A電腦 04/27 13:06