[問答] routing table

看板Network作者 (Arim5566)時間13年前 (2012/11/25 18:20), 編輯推噓0(004)
留言4則, 1人參與, 最新討論串1/2 (看更多)
各位版友好 最近在準備網路相關的考試 看到一題routing的問題,不是很確定自己的觀念正不正確@@ 以下是題目,(a)跟(b)是連續的小題: (a) If the mask of a network interface, nif1, is 255.255.255.255, please describe how the routing module processes IP datagrams. 我的理解是router收到該ip datagrams之後會先利用255.255.255.255跟該ip做and找到 net id,接著比對routing table有沒有該net id,有的話就往對應的gateway送出去 只是mask如果是255.255.255.255的話不就表示該網段沒有host嗎?(這樣子有意義嗎?) (b)If we add one more network interface, nif2, with the mask 255.255.255.0, how is a IP datagram, which comes into this router, processed. 這個小題的答案我覺得跟a小題是一樣的,也是一樣的步驟 解答是寫這樣的... (a) If the host receive the IP datagram from nif1 with it’s IP configured, it’ ll be pass to kernel IP layer,but if the host is going to send IP datagram the routing module won’t have any information from that interface. (b) Router will accept any IP address from same network id, and see if it’s dest ip is in the different network, if it is, forward it. 老實講我看不太懂解答再寫什麼@@ 不知道我的觀念正不正確 有請版友指教了 謝謝 -- ~宅男的四個徵兆~ ∠□ ○ ! * \○/ ★    (○ ? ╦╦└□ " ○□═ □   □> ║║√√ ╦══╦ ∥    |\ 一回家就上PTT 每天想正妹 以當好人為樂 忘記正妹虧欠自己 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.117.169.131

11/28 00:14, , 1F
這時候主機會根據路由表,把封包交給自己的網路層處理
11/28 00:14, 1F

11/28 00:14, , 2F
如果是要把封包送到該介面以外的IP,因為沒有任何主機是
11/28 00:14, 2F

11/28 00:15, , 3F
同一個網段的,封包就會被丟棄
11/28 00:15, 3F

11/28 00:15, , 4F
抱歉推錯了,上面那三行是要推在下面接上去的XD
11/28 00:15, 4F
文章代碼(AID): #1GiV3t-N (Network)
討論串 (同標題文章)
以下文章回應了本文
完整討論串 (本文為第 1 之 2 篇):
0
4
文章代碼(AID): #1GiV3t-N (Network)