1. 统计连接状态

netstat -n | awk '/^tcp/ {++State[$NF]} END {for(s in State) print s, State[s]}'
CLOSE_WAIT 3
ESTABLISHED 28
SYN_SENT 6

 https://www.infoq.cn/article/linux-networking-performance-analytics

https://blog.csdn.net/shixin_0125/article/details/78686152

 

2. 查询网络网关地址

route -n
netstat -rn

3. 查询网络路由地址

nslookup www.baidu.com

4. 配置网关地址(临时)

route add default gw 102.168.1.1

5. 配置网络地址(临时)

ifconfig eth0 102.168.1.10 netmask 255.255.255.0

6. 配置DNS地址

echo nameserver 8.8.8.8 >> /etc/resolv.conf

 

7. nc 工具使用说明

//1)端口扫描
nc -z -v 127.0.0.1 1-65535
-v Verbose message

//2)接受文件
nc -l 1709 > reveive.file

//3)发送文件
nc 127.0.0.1 1709 < original.file

//4)udp client
nc -u 127.0.0.1 1709

//5)udp server
nc -u -l 1709

//5)tcp clinet
nc -t 127.0.0.1 1709

//6)tcp server
nc -t -l 1709

 

8. tcpdump 工具使用说明

1)UDP端口监听(必须制定网口)
sudo tcpdump -i lo0 -vv -X udp port 1709

 

相关文章:

  • 2021-10-16
  • 2021-11-20
  • 2021-11-12
  • 2021-12-05
  • 2022-12-23
  • 2021-09-10
  • 2021-05-19
  • 2022-12-23
猜你喜欢
  • 2021-12-24
  • 2021-11-12
  • 2021-06-02
  • 2021-06-11
  • 2021-08-15
  • 2021-04-22
  • 2021-05-20
相关资源
相似解决方案