Posts

Showing posts from February 17, 2008

TCP/IP 三方交握

最近在整理ICND1教材時,發現在P.1-108中介紹Sequence Number的地方有所錯誤,而ICND1的內文只是講解概念並未提出明確的實例來加強學生的觀念,但是大樓平地起,基礎不穩固造成的結果就會讓一知半解的學生繼續一知半解下去甚至導引成錯誤的觀念。所以我轉貼網路上比較完整的說明(利用封包內容的實際欄位來說明TCP/IP三方交握的過程),這份文件來自於微軟官網自動翻譯的結果,所以有些地方不流暢請包涵!

建立連線
下列順序顯示 TCP 連線而建立的程序:

【框架一】

1 2.0785 NTW3 --> BDC3 TCP ....S., len: 4, seq: 8221822-8221825,ack: 0, win: 8192, src: 1037 dst: 139 (NBT Session) NTW3 --> BDC3 IP

TCP: ....S., len: 4, seq: 8221822-8221825, ack: 0, win: 8192, src: 1037 dst: 139 (NBT Session)

TCP: Source Port = 0x040D
TCP: Destination Port = NETBIOS Session Service
TCP: Sequence Number = 8221822 (0x7D747E)
TCP: Acknowledgement Number = 0 (0x0)
TCP: Data Offset = 24 (0x18)
TCP: Reserved = 0 (0x0000)
TCP: Flags = 0x02 : ....S.

TCP: ..0..... = No urgent data
TCP: ...0.... = Acknowledgement field not significant
TCP: ....0... = No Push function
TCP: .....0.. = No Reset
TCP: ......1. = Synchronize sequence numbers
TCP: .......0 = No Fin

TCP: Window = 8192 (0x2000)
TCP: Checksum = 0xF213
TCP: Urgent Pointer = 0 (0x0)
TCP: Options

TCP: O…