• 3、SYN-SENT


    
    3、SYN-SENT
    
    
    node2:/root#netstat -atnp | grep -i 8080  
    tcp        0      1 192.168.171.103:16707       192.0.2.1:8080              SYN_SENT    25943/packetdrill
    
    客户端发送 SYN 报文等待 ACK 的过程进入 SYN-SENT状态。同时会开启一个定时器,如果超时还没有收到ACK会重发 SYN。
    
    
    
    node2:/root#netstat -na |grep 1.1.1.1
    tcp        0      1 192.168.137.3:18824         1.1.1.1:8080                SYN_SENT    
    node2:/root#
    
    
    
    node2:/root/test#time python t19.py 
    Traceback (most recent call last):
      File "t19.py", line 6, in <module>
        s.connect(("1.1.1.1",8080))
      File "/usr/local/python27/lib/python2.7/socket.py", line 224, in meth
        return getattr(self._sock,name)(*args)
    socket.error: [Errno 110] Connection timed out
    
    real	1m3.033s
    user	0m0.021s
    sys	0m0.007s
    
    
    node2:/root#tcpdump -S -i eth1 '((tcp) and  (port 8080) )'
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth1, link-type EN10MB (Ethernet), capture size 65535 bytes
    20:31:22.137177 IP node2.18839 > one.one.one.one.webcache: Flags [S], seq 42287086, win 14600, options [mss 1460,sackOK,TS val 315723831 ecr 0,nop,wscale 7], length 0
    20:31:23.137125 IP node2.18839 > one.one.one.one.webcache: Flags [S], seq 42287086, win 14600, options [mss 1460,sackOK,TS val 315724831 ecr 0,nop,wscale 7], length 0
    20:31:25.138218 IP node2.18839 > one.one.one.one.webcache: Flags [S], seq 42287086, win 14600, options [mss 1460,sackOK,TS val 315726833 ecr 0,nop,wscale 7], length 0
    20:31:29.138849 IP node2.18839 > one.one.one.one.webcache: Flags [S], seq 42287086, win 14600, options [mss 1460,sackOK,TS val 315730833 ecr 0,nop,wscale 7], length 0
    20:31:37.139324 IP node2.18839 > one.one.one.one.webcache: Flags [S], seq 42287086, win 14600, options [mss 1460,sackOK,TS val 315738834 ecr 0,nop,wscale 7], length 0
    20:31:53.140281 IP node2.18839 > one.one.one.one.webcache: Flags [S], seq 42287086, win 14600, options [mss 1460,sackOK,TS val 315754835 ecr 0,nop,wscale 7], length 0
  • 相关阅读:
    IE8 "开发人员工具" 无法使用,无法显示
    Python中用OpenPyXL处理Excel表格
    calendar函数使用说明【转】
    python之fabric2.0模块学习
    Day9
    Day8
    深入super,看Python如何解决钻石继承难题——转自楚门蔡的测视界
    python/socket编程之粘包
    os模块关于目录
    Day7
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13348478.html
Copyright © 2020-2023  润新知