Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I don't know how to creat mapper_file #7

Open
NigelBoxing opened this issue Apr 4, 2020 · 1 comment
Open

I don't know how to creat mapper_file #7

NigelBoxing opened this issue Apr 4, 2020 · 1 comment
Labels

Comments

@NigelBoxing
Copy link

Host,Start_row,End_row,Number,IP
Please explain the specific meaning of the above words in the mapper_file
It will be nice if there is an example of pcap->ditg script

@devenbansod
Copy link
Owner

Hi @NigelBoxing! Apologies for the unclear documentation.

The assumption is that the PCAP file might have a huge number of IPs floating around. For ex. there might be 1000 IPs that are encountered in the PCAP file. This list of all IPs encountered in the PCAP file can be generated using:

$ touch list_file mapper_file # just creating empty files
$ python run.py -p pcap_file mapper_file list_file > list_file

Now, when you're replaying the traffic, you might be doing so using lesser number of hosts (say 4 hosts). So, you would need to map those 1000 IPs (assuming you want to use all traffic) generated in the list_file.

Now, you can decide on how to map these 1000 IPs onto 4 hosts to be able to generate the DITG scripts to be run on these 4 hosts.

You can do this any way you want:

  1. You could split 250 among all
  2. You could do 700, 100, 100, 100
    and so on...

Now, the mapper_file defines how you want to map these 1000 IPs in the PCAP file (or how many ever of those 1000 that you want to use) to these 4 host IPs.

Now host and IP are host name and IP of the hosts in your experiment's topology and I will try to explain start row, end row and number using an example:

Ex. 1: You have 1000 IPs in the list_file (generated as shown above). You want to use 800 of these IPs and map them equally onto 4 hosts
The mapper file should look like:

Host,Start_row,End_row,Number,IP
h1,0,199,200,10.0.0.1
h2,200,399,200,10.0.0.2
h3,400,599,200,10.0.0.3
h4,600,799,200,10.0.0.4

Ex. 2: You have 1000 IPs in the list_file (generated as shown above). You want to use 500 of these IPs and map them h1: first 200, h2: 50 between 250-300, h3: 150 between 600-750, h4: 100 between 800-900

The mapper file should look like:

Host,Start_row,End_row,Number,IP
h1,0,199,200,10.0.0.1
h2,250,299,50,10.0.0.2
h3,600,749,150,10.0.0.3
h4,800,899,100,10.0.0.4

Hope that clarifies. Let me know if you have additional questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants