資源描述:
《TCP-UDP(wireshark)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、TCP和UDP報(bào)文分析(Wireshark)院系:班級(jí):學(xué)號(hào):姓名:教師:2012年11月4日目錄一9TCP連接時(shí)的三次握手··································3二TCP連接釋放時(shí)的四次握手······························5三UDP報(bào)文分析··········································73.1UDP報(bào)文結(jié)構(gòu)······································73.2UDP檢驗(yàn)和的計(jì)算·························
2、········7四結(jié)束語(yǔ)···············································99一、TCP連接時(shí)的三次握手TCP協(xié)議為終端設(shè)備提供了面向連接的、可靠的網(wǎng)絡(luò)服務(wù)。TCP在交換數(shù)據(jù)報(bào)文段之前要在發(fā)送方和接收方之間建立連接??蛻羰沁B接的發(fā)起者,服務(wù)器是被動(dòng)打開(kāi)和客戶進(jìn)行聯(lián)系。具體的過(guò)程如下所述。第一次握手:客戶發(fā)送SYN=1,seq=0的TCP報(bào)文給服務(wù)器Ps:客戶的TCP向服務(wù)器發(fā)出連接請(qǐng)求報(bào)文段,其首部中的同步位SYN=1。序號(hào)seq=0,表明報(bào)文中未攜帶數(shù)據(jù)。報(bào)文如下:源端口號(hào):56644(56644)目的端
3、口號(hào):http(80)[Streamindex:0]Sequencenumber:0(relativesequencenumber)Headerlength:32bytesFlags:0x02(SYN)000.........=Reserved:Notset...0........=Nonce:Notset....0.......=CongestionWindowReduced(CWR):Notset.....0......=ECN-Echo:Notset......0.....=Urgent:Notset.......0....=Acknowledg
4、ement:Notset........0...=Push:Notset.........0..=Reset:Notset..........1.=Syn:Set9...........0=Fin:NotsetWindowsize:8192Checksum:0x1030[validationdisabled]Options:(12bytes)第二次握手:服務(wù)器發(fā)送SYN=1,ACK=1,seq=0的TCP報(bào)文給客戶Ps:服務(wù)器的TCP收到客戶發(fā)來(lái)的連接請(qǐng)求報(bào)文段后,如同意,則發(fā)回確認(rèn)。服務(wù)器在確認(rèn)報(bào)文段中應(yīng)使SYN=1,使ACK=1。序號(hào)seq=0,表
5、明報(bào)文中未攜帶數(shù)據(jù)。報(bào)文如下:源端口號(hào):http(80)目的端口號(hào):56644(56644)[Streamindex:0]Sequencenumber:0(relativesequencenumber)Acknowledgementnumber:1(relativeacknumber)Headerlength:32bytesFlags:0x12(SYN,ACK)000.........=Reserved:Notset...0........=Nonce:Notset....0.......=CongestionWindowReduced(CWR):No
6、tset.....0......=ECN-Echo:Notset......0.....=Urgent:Notset.......1....=Acknowledgement:Set........0...=Push:Notset.........0..=Reset:Notset..........1.=Syn:Set...........0=Fin:NotsetWindowsize:5840Checksum:0x54f6[validationdisabled]Options:(12bytes)第三次握手:客戶發(fā)送ACK=1的TCP報(bào)文給服務(wù)器Ps:客戶
7、收到報(bào)文段后向服務(wù)器給出確認(rèn),其ACK=1??蛻舻腡CP通知上層應(yīng)用進(jìn)程,連接已經(jīng)建立。服務(wù)器的TCP收到主機(jī)客戶的確認(rèn)后,也通知其上層應(yīng)用進(jìn)程,TCP連接已經(jīng)建立。報(bào)文如下:源端口號(hào):56644(56644)目的端口號(hào):http(80)[Streamindex:0]Sequencenumber:1(relativesequencenumber)Acknowledgementnumber:1(relativeacknumber)Headerlength:20bytes9Flags:0x10(ACK)000.........=Reserved:Notse
8、t...0........=Nonce:Notset....0.......=Congesti