Search code examples
linuxnetwork-programmingsdnarpmininet

How could I run ARP in mininet Python script?


I run my topology through this command from a terminal:

sudo mn --custom=~/myTopo.py --topo=myTopo --mac --arp --switch=ovsk --controller=remote

But how could I write the same command in a Python script?

net = Mininet(topo=topo, switch=OVSSwitch, link=TCLink, controller=RemoteController('c0', ip='127.0.0.1', port=6633))

This code is written in the script, but I could not include ARP in a Python script. What is the correct syntax to be written?


Solution

  • You can do it with:

    net = Mininet(topo=topo, switch=OVSSwitch, link=TCLink, controller=RemoteController('c0', ip='127.0.0.1', port=6633))
    net.staticArp()