D-ITG流量发送

3

我正在终端上使用以下命令生成D-ITG流量:

ITGSend -a 10.1.1.129 -T TCP -sp 49000 -rp 49000 -C 100 -c 500 -t 2000 -l sender.log

然后它显示以下错误消息:

flowSender: Address family not supported by protocol
Could not bind a new socket. Flow ID: 1
Error - FlowSender interrupted by an error
Finished sending packets of flow ID: 1

请为我提供更好的解决方案,以设置D-ITG流量中的源端口。

3个回答

0

如果有人因为某种原因仍在使用低于2.8.1版本的D-ITG,解决方法是在两端禁用IPv6:

sudo -S sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo -S sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo -S sysctl -w net.ipv6.conf.lo.disable_ipv6=1

D-ITG 2.8.1 (r66M)没有这个问题。

更新: 版本2.8.1在运行以下场景时存在问题(在2.8.0上正常工作):

ITGRecv -Sp 9001
ITGSend -D -a 2001:db8:1234:100::2 -sa fd00:10::11 -Sdp 9001 -rp 23150 -sp 23150 -T TCP -t 30000 -C 128.0 -c 400

0

关于此,您应该参考此链接:http://traffic.comics.unina.it/software/ITG/manual/ 在DITG中设置源端口和目标端口,有以下选项可用。

-sp <src_port>          Set the source port (default: Set by O.S.).
This option applies only to traffic flow.

-rp <dest_port>         Set the destination port (default: 8999).
This option applies only to traffic flows.

根据DITG手册中列出的示例,我们可以使用这些选项来设置源端口和目标端口。

0

互联网数字分配机构(IANA)建议使用49152到65535(215+214到216−1)的范围用于动态或私有端口。许多Linux内核使用32768到60999的端口范围。

在我的Linux Debian上

# sysctl net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 32768    60999

如果您在此范围内使用值,它将起作用。

发送方:

# ITGSend -a 172.16.25.129  -rp 32769 -C 100 -c 500 -t 20000 -x recv_log_file
ITGSend version 2.8.1 (r1023)
Compile-time options: sctp dccp bursty multiport
Started sending packets of flow ID: 1
Finished sending packets of flow ID: 1

接收方:

# ITGRecv
ITGRecv version 2.8.1 (r1023)
Compile-time options: sctp dccp bursty multiport
Press Ctrl-C to terminate
Listening on UDP port : 32769
Finish on UDP port : 32769
Listening on UDP port : 32769
Finish on UDP port : 32769

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接