常用的流量模拟命令总结
- 使用 nc 模拟 http 流量
1 | echo -e "GET / HTTP/1.1\r\nHost: hello.com\r\nConnection: close\r\n" \ |
- 指定源 IP 进行 ping 测试
1 | ping -I 192.168.1.10 192.168.1.11 |
- 指定源端口访问 HTTP
1 | curl http://192.168.1.10:1024 --local-port 1248 |
1 | echo -e "GET / HTTP/1.1\r\nHost: hello.com\r\nConnection: close\r\n" \ |
1 | ping -I 192.168.1.10 192.168.1.11 |
1 | curl http://192.168.1.10:1024 --local-port 1248 |