I'm trying to use the following code to produce traffic on a mininet network (with a pox controller, one switch and four hosts). The sourceIPgen() function produces random source IP addresses,and the gendest(start, end) function produces dst IPs. Destination IPs start with 10.0.0. ,and the last value is entered by the user. This is the command to get the last value from the command line:
my question is that: What is the format of entering the values in command line?
Is this correct?(to send the packets to hosts: 10.0.0.1 to 10.0.0.4 ): python filename.py -1 -4
This is the code:
But it does'nt work for me!I know that the two sourceIPgen() and gendest(start, end) functions work properly, because i tested them in another script. when i try to run the script with the " python filename.py -1 -4 " command, no thing happens!no traffic is generated,no thing is printed, no thing!
Could you please tell me what's wrong with the code? Am i typing the execution command in a wrong way?