我知道的过程大概是
Client->SYN->Server
Client<-SYN+ACK<-Server
Client->ACK->Server
Client->Http Request->Server问题1 以上过程是否正确
问题2 第三步一直是出现 Client->RST->Server 没法继续数据包如下
===========================================================================
Packet #11, Direction: Out, Time:03:06:32.895, Size: 54
Ethernet II
Destination MAC: 00:0A:EB:D8:5A:C2
Source MAC: 52:54:AB:4F:DF:DB
Ethertype: 0x0800 (2048) - IP
IP
IP version: 0x04 (4)
Header length: 0x05 (5) - 20 bytes
Type of service: 0x00 (0)
Precedence: 000 - Routine
Delay: 0 - Normal delay
Throughput: 0 - Normal throughput
Reliability: 0 - Normal reliability
Total length: 0x0028 (40)
ID: 0x64FD (25853)
Flags
Don't fragment bit: 0 - May fragment
More fragments bit: 0 - Last fragment
Fragment offset: 0x0000 (0)
Time to live: 0x80 (128)
Protocol: 0x06 (6) - TCP
Checksum: 0x592C (22828) - correct
Source IP: 192.168.8.101
Destination IP: 210.72.225.80
IP Options: None
TCP
Source port: 1036
Destination port: 80
Sequence: 0x00198288 (1671816)
Acknowledgement: 0x00000000 (0)
Header length: 0x05 (5) - 20 bytes
Flags: SYN
URG: 0
ACK: 0
PSH: 0
RST: 0
SYN: 1
FIN: 0
Window: 0x4470 (17520)
Checksum: 0x67CE (26574) - correct
Urgent Pointer: 0x0000 (0)
TCP Options: None
Data length: 0x0 (0)
Raw Data:
0x0000 00 0A EB D8 5A C2 52 54-AB 4F DF DB 08 00 45 00 ..胴Z翿T玂咣..E.
0x0010 00 28 64 FD 00 00 80 06-59 2C C0 A8 08 65 D2 48 .(d?.€.Y,括.e襀
0x0020 E1 50 04 0C 00 50 00 19-82 88 00 00 00 00 50 02 酨...P..倛....P.
0x0030 44 70 67 CE 00 00 Dpg?.============================================================================Packet #12, Direction: In, Time:03:06:32.905, Size: 60
Ethernet II
Destination MAC: 52:54:AB:4F:DF:DB
Source MAC: 00:0A:EB:D8:5A:C2
Ethertype: 0x0800 (2048) - IP
IP
IP version: 0x04 (4)
Header length: 0x05 (5) - 20 bytes
Type of service: 0x00 (0)
Precedence: 000 - Routine
Delay: 0 - Normal delay
Throughput: 0 - Normal throughput
Reliability: 0 - Normal reliability
Total length: 0x002C (44)
ID: 0x5FC8 (24520)
Flags
Don't fragment bit: 1 - Don't fragment
More fragments bit: 0 - Last fragment
Fragment offset: 0x0000 (0)
Time to live: 0x74 (116)
Protocol: 0x06 (6) - TCP
Checksum: 0x2A5D (10845) - correct
Source IP: 210.72.225.80
Destination IP: 192.168.8.101
IP Options: None
TCP
Source port: 80
Destination port: 1036
Sequence: 0x26F99791 (653891473)
Acknowledgement: 0x00198289 (1671817)
Header length: 0x06 (6) - 24 bytes
Flags: SYN ACK
URG: 0
ACK: 1
PSH: 0
RST: 0
SYN: 1
FIN: 0
Window: 0x40E8 (16616)
Checksum: 0x9506 (38150) - correct
Urgent Pointer: 0x0000 (0)
TCP Options
Maximum Segment Size: 0x05AC (1452)
Data length: 0x0 (0)
Raw Data:
0x0000 52 54 AB 4F DF DB 00 0A-EB D8 5A C2 08 00 45 00 RT玂咣..胴Z?.E.
0x0010 00 2C 5F C8 40 00 74 06-2A 5D D2 48 E1 50 C0 A8 .,_菮.t.*]襀酨括
0x0020 08 65 00 50 04 0C 26 F9-97 91 00 19 82 89 60 12 .e.P..&鶙?.倝`.
0x0030 40 E8 95 06 00 00 02 04-05 AC 00 00 @钑......?.============================================================================Packet #13, Direction: Out, Time:03:06:32.915, Size: 54
Ethernet II
Destination MAC: 00:0A:EB:D8:5A:C2
Source MAC: 52:54:AB:4F:DF:DB
Ethertype: 0x0800 (2048) - IP
IP
IP version: 0x04 (4)
Header length: 0x05 (5) - 20 bytes
Type of service: 0x00 (0)
Precedence: 000 - Routine
Delay: 0 - Normal delay
Throughput: 0 - Normal throughput
Reliability: 0 - Normal reliability
Total length: 0x0028 (40)
ID: 0x64FE (25854)
Flags
Don't fragment bit: 0 - May fragment
More fragments bit: 0 - Last fragment
Fragment offset: 0x0000 (0)
Time to live: 0x80 (128)
Protocol: 0x06 (6) - TCP
Checksum: 0x592B (22827) - correct
Source IP: 192.168.8.101
Destination IP: 210.72.225.80
IP Options: None
TCP
Source port: 1036
Destination port: 80
Sequence: 0x00198289 (1671817)
Acknowledgement: 0x00198289 (1671817)
Header length: 0x05 (5) - 20 bytes
Flags: RST
URG: 0
ACK: 0
PSH: 0
RST: 1
SYN: 0
FIN: 0
Window: 0x0000 (0)
Checksum: 0x2999 (10649) - correct
Urgent Pointer: 0x0000 (0)
TCP Options: None
Data length: 0x0 (0)
Raw Data:
0x0000 00 0A EB D8 5A C2 52 54-AB 4F DF DB 08 00 45 00 ..胴Z翿T玂咣..E.
0x0010 00 28 64 FE 00 00 80 06-59 2B C0 A8 08 65 D2 48 .(d?.€.Y+括.e襀
0x0020 E1 50 04 0C 00 50 00 19-82 89 00 19 82 89 50 04 酨...P..倝..倝P.
0x0030 00 00 29 99 00 00 ..)?.============================================================================
Client->SYN->Server
Client<-SYN+ACK<-Server
Client->ACK->Server
Client->Http Request->Server问题1 以上过程是否正确
问题2 第三步一直是出现 Client->RST->Server 没法继续数据包如下
===========================================================================
Packet #11, Direction: Out, Time:03:06:32.895, Size: 54
Ethernet II
Destination MAC: 00:0A:EB:D8:5A:C2
Source MAC: 52:54:AB:4F:DF:DB
Ethertype: 0x0800 (2048) - IP
IP
IP version: 0x04 (4)
Header length: 0x05 (5) - 20 bytes
Type of service: 0x00 (0)
Precedence: 000 - Routine
Delay: 0 - Normal delay
Throughput: 0 - Normal throughput
Reliability: 0 - Normal reliability
Total length: 0x0028 (40)
ID: 0x64FD (25853)
Flags
Don't fragment bit: 0 - May fragment
More fragments bit: 0 - Last fragment
Fragment offset: 0x0000 (0)
Time to live: 0x80 (128)
Protocol: 0x06 (6) - TCP
Checksum: 0x592C (22828) - correct
Source IP: 192.168.8.101
Destination IP: 210.72.225.80
IP Options: None
TCP
Source port: 1036
Destination port: 80
Sequence: 0x00198288 (1671816)
Acknowledgement: 0x00000000 (0)
Header length: 0x05 (5) - 20 bytes
Flags: SYN
URG: 0
ACK: 0
PSH: 0
RST: 0
SYN: 1
FIN: 0
Window: 0x4470 (17520)
Checksum: 0x67CE (26574) - correct
Urgent Pointer: 0x0000 (0)
TCP Options: None
Data length: 0x0 (0)
Raw Data:
0x0000 00 0A EB D8 5A C2 52 54-AB 4F DF DB 08 00 45 00 ..胴Z翿T玂咣..E.
0x0010 00 28 64 FD 00 00 80 06-59 2C C0 A8 08 65 D2 48 .(d?.€.Y,括.e襀
0x0020 E1 50 04 0C 00 50 00 19-82 88 00 00 00 00 50 02 酨...P..倛....P.
0x0030 44 70 67 CE 00 00 Dpg?.============================================================================Packet #12, Direction: In, Time:03:06:32.905, Size: 60
Ethernet II
Destination MAC: 52:54:AB:4F:DF:DB
Source MAC: 00:0A:EB:D8:5A:C2
Ethertype: 0x0800 (2048) - IP
IP
IP version: 0x04 (4)
Header length: 0x05 (5) - 20 bytes
Type of service: 0x00 (0)
Precedence: 000 - Routine
Delay: 0 - Normal delay
Throughput: 0 - Normal throughput
Reliability: 0 - Normal reliability
Total length: 0x002C (44)
ID: 0x5FC8 (24520)
Flags
Don't fragment bit: 1 - Don't fragment
More fragments bit: 0 - Last fragment
Fragment offset: 0x0000 (0)
Time to live: 0x74 (116)
Protocol: 0x06 (6) - TCP
Checksum: 0x2A5D (10845) - correct
Source IP: 210.72.225.80
Destination IP: 192.168.8.101
IP Options: None
TCP
Source port: 80
Destination port: 1036
Sequence: 0x26F99791 (653891473)
Acknowledgement: 0x00198289 (1671817)
Header length: 0x06 (6) - 24 bytes
Flags: SYN ACK
URG: 0
ACK: 1
PSH: 0
RST: 0
SYN: 1
FIN: 0
Window: 0x40E8 (16616)
Checksum: 0x9506 (38150) - correct
Urgent Pointer: 0x0000 (0)
TCP Options
Maximum Segment Size: 0x05AC (1452)
Data length: 0x0 (0)
Raw Data:
0x0000 52 54 AB 4F DF DB 00 0A-EB D8 5A C2 08 00 45 00 RT玂咣..胴Z?.E.
0x0010 00 2C 5F C8 40 00 74 06-2A 5D D2 48 E1 50 C0 A8 .,_菮.t.*]襀酨括
0x0020 08 65 00 50 04 0C 26 F9-97 91 00 19 82 89 60 12 .e.P..&鶙?.倝`.
0x0030 40 E8 95 06 00 00 02 04-05 AC 00 00 @钑......?.============================================================================Packet #13, Direction: Out, Time:03:06:32.915, Size: 54
Ethernet II
Destination MAC: 00:0A:EB:D8:5A:C2
Source MAC: 52:54:AB:4F:DF:DB
Ethertype: 0x0800 (2048) - IP
IP
IP version: 0x04 (4)
Header length: 0x05 (5) - 20 bytes
Type of service: 0x00 (0)
Precedence: 000 - Routine
Delay: 0 - Normal delay
Throughput: 0 - Normal throughput
Reliability: 0 - Normal reliability
Total length: 0x0028 (40)
ID: 0x64FE (25854)
Flags
Don't fragment bit: 0 - May fragment
More fragments bit: 0 - Last fragment
Fragment offset: 0x0000 (0)
Time to live: 0x80 (128)
Protocol: 0x06 (6) - TCP
Checksum: 0x592B (22827) - correct
Source IP: 192.168.8.101
Destination IP: 210.72.225.80
IP Options: None
TCP
Source port: 1036
Destination port: 80
Sequence: 0x00198289 (1671817)
Acknowledgement: 0x00198289 (1671817)
Header length: 0x05 (5) - 20 bytes
Flags: RST
URG: 0
ACK: 0
PSH: 0
RST: 1
SYN: 0
FIN: 0
Window: 0x0000 (0)
Checksum: 0x2999 (10649) - correct
Urgent Pointer: 0x0000 (0)
TCP Options: None
Data length: 0x0 (0)
Raw Data:
0x0000 00 0A EB D8 5A C2 52 54-AB 4F DF DB 08 00 45 00 ..胴Z翿T玂咣..E.
0x0010 00 28 64 FE 00 00 80 06-59 2B C0 A8 08 65 D2 48 .(d?.€.Y+括.e襀
0x0020 E1 50 04 0C 00 50 00 19-82 89 00 19 82 89 50 04 酨...P..倝..倝P.
0x0030 00 00 29 99 00 00 ..)?.============================================================================
Client->SYN->Server
Client<-SYN+ACK<-Server
Client->ACK->Server
是正确的第3步RST了应该是你代码的问题写个最简单的TCP也能3次握手连上去的
BSD 一类的系统才行么,不会吧,那可麻烦了
https://www.xfocus.net/bbs/index.php?act=ST&f=3&t=37431&page=1