sushmita das
sushmita das

Reputation: 83

Scapy with Mininet

How can I run a scapy script inside mininet to generate custom packets? I know I could generate traffic using iperf ,netperf etc.But I need to customize the packets and then use them in mininet. Thanks, Regards, Sushmita

Upvotes: 1

Views: 2264

Answers (3)

shellwhale
shellwhale

Reputation: 902

Currently, the best way to achieve this is to use containernet, an actively developed fork of mininet that allow integration of Docker containers. Just use a container that includes Scapy and you are good to go.

Upvotes: 0

J.Jey
J.Jey

Reputation: 11

Scapy needs root authentication to run.It is difficult to use in the mininet environment. But you can use nat in mininet, then build packets in your machine and then send to hosts in miininet.

Upvotes: 1

dside
dside

Reputation: 110

You can generate trafic from hosts. You can run cli commands using xterm. I think that using dpkg-name -v you can see what version is emulated by host. So, you can customize ping or whatever you want from the emulated host!

Here you can see how to run commands in hosts setting a simulation from python script. E.g.

h1 = net.get('h1')    
result = h1.cmd('ifconfig')
print result

Upvotes: 1

Related Questions