项目

一般

简介

网络测试工具

  1. 测试udp连通性
    # 在一端执行
    echo "hello,udp server." | nc -u 192.168.0.100 123
    # 在另一端抓包
    tcpdump -i any udp and port 123 -X
    
  2. tcping
    1)使用tcptraceroute实现tcping
    apt install tcptraceroute
    http://www.vdberg.org/~richard/tcpping
    Usage: tcpping [-d] [-c] [-C] [-w sec] [-q num] [-x count] ipaddress [port]
    
            -d   print timestamp before every result
            -c   print a columned result line
            -C   print in the same format as fping's -C option
            -w   wait time in seconds (defaults to 3)
            -r   repeat every n seconds (defaults to 1)
            -x   repeat n times (defaults to unlimited)
    
    See also: man tcptraceroute
    
    Usage: tcptraceroute [-nNFSAE] [-i <interface>] [-f <first ttl>]
           [-l <packet length>] [-q <number of queries>] [-t <tos>]
           [-m <max ttl>] [-pP] <source port>] [-s <source address>]
           [-w <wait time>] <host> [destination port] [packet length]
    
    2)原生
    windows(带源码):
    https://www.elifulkerson.com/projects/tcping.php
    linux:
    https://github.com/mkirchner/tcping/
    https://codeload.github.com/mkirchner/tcping/tar.gz/refs/tags/2.1.0
    Usage: ./tcping [-q] [-f <4|6>] [-t timeout_sec] [-u timeout_usec] <host> <port>