Re: 請問一下關於IP datagram header

看板Network作者 (Ya-Shiuan)時間20年前 (2005/06/20 00:52), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串2/2 (看更多)
※ 引述《willhunting (花關索 錦馬超)》之銘言: : 看書上說,datagram裡原來就有四個bits去放header ^^^^^^^^ : 然後datagram裡的32 bits的options又往往作為header : 的延伸,所以datagram可以有20 bytes的header : 請問這是怎麼算的呀? 其實我看不太懂你的問題耶..~"~..(小弟資淺) 一般 IP header 的欄位有 4 bits IP Version 4 bits header length(單位 4bytes) 8 bits Reserve 16bits Total Length (Header+Data 單位 bytes) 16bits Identification Number 4 bits Flags(做 fragment 用的) 12bits Fragment offset(配合上面) 8 bits TTL 8 bits Protocol Number(指定 IP 所包的是什麼 protocol) 16bits Header checksum 32bits Source IP + 32bits Distination IP ---------------------------------------------- 160bits = 20Bytes 20 是這樣出來的...保留欄位部分,已經有些程式拿來做其他用途.. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.134.242.114

218.166.78.147 06/21, , 1F
喔讚 我看懂了 感謝感謝!
218.166.78.147 06/21, 1F

140.134.242.114 06/21, , 2F
Not at all..
140.134.242.114 06/21, 2F
文章代碼(AID): #12jQB53P (Network)
討論串 (同標題文章)
文章代碼(AID): #12jQB53P (Network)