from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.disableArpTables() net.execScript('python l2_learning_controller.py s1 cpu &', reboot=True) net.execScript('python l2_learning_controller.py s2 cpu &', reboot=True) net.execScript('python l2_learning_controller.py s3 cpu &', reboot=True) net.execScript('python l2_learning_controller.py s4 cpu &', reboot=True) # Network definition net.addP4Switch('s1') net.setP4Source('s1','./p4src/l2_learning_copy_to_cpu.p4') net.addP4Switch('s2') net.setP4Source('s2','./p4src/l2_learning_copy_to_cpu.p4') net.addP4Switch('s3') net.setP4Source('s3','./p4src/l2_learning_copy_to_cpu.p4') net.addP4Switch('s4') net.setP4Source('s4','./p4src/l2_learning_copy_to_cpu.p4') net.addHost('h1') net.addHost('h2') net.addHost('h3') net.addHost('h4') net.addHost('h5') net.addHost('h6') net.addLink('s1', 'h1') net.addLink('s1', 'h2') net.addLink('s2', 's1') net.addLink('s2', 's3')
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() net.disableArpTables() # Network definition net.addP4Switch('s1') net.setP4Source('s1', './p4src/l2_learning_digest.p4') net.addHost('h1') net.addHost('h2') net.addHost('h3') net.addHost('h4') net.addLink('s1', 'h1') net.addLink('s1', 'h2') net.addLink('s1', 'h3') net.addLink('s1', 'h4') # Assignment strategy net.l2() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() # Network definition net.addP4Switch('s1', cli_input='s1-commands.txt') net.setP4Source('s1','verify_checksum.p4') net.addHost('h1') net.addHost('h2') net.addLink('s1', 'h1') net.addLink('s1', 'h2') # Assignment strategy net.mixed() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.setCompiler(p4rt=True) net.execScript('python controller-other-ports.py', reboot=True) net.disableArpTables() # Network definition net.addP4RuntimeSwitch('s1') net.setP4Source('s1', './p4src/l2_flooding_other_ports.p4') net.addHost('h1') net.addHost('h2') net.addHost('h3') net.addHost('h4') net.addLink('s1', 'h1') net.addLink('s1', 'h2') net.addLink('s1', 'h3') net.addLink('s1', 'h4') # Assignment strategy net.l2() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() net.enableCli() net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() # Network definition net.addP4Switch('s1', cli_input='s1-commands.txt') net.setP4Source('s1','ternary-match.p4') net.addHost('h1') net.addHost('h2') net.addLink('s1', 'h1') net.addLink('s1', 'h2') # Assignment strategy net.mixed() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() # Network definition net.addP4Switch('s1', cli_input='s1-commands.txt') net.setP4Source('s1', './p4src/multicast.p4') net.addHost('h1') net.addHost('h2') net.addHost('h3') net.addHost('h4') net.addLink('s1', 'h1') net.addLink('s1', 'h2') net.addLink('s1', 'h3') net.addLink('s1', 'h4') # Assignment strategy net.mixed() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() net.execScript('./fill_register.py') # Network definition net.addP4Switch('s1') net.setP4Source('s1', 'p4src/recirculate_and_add.p4') net.addHost('h1') net.addHost('h2') net.addLink('s1', 'h1') net.addLink('s1', 'h2') # Assignment strategy net.l2() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() # Network definition net.addP4Switch('s1', cli_input='s1-commands.txt') net.setP4Source('s1', 'stateful_firewall.p4') net.addP4Switch('s2', cli_input='s2-commands.txt') net.setP4Source('s2', 'ip_forwarding.p4') net.addHost('h1') net.addHost('h2') net.addLink('h1', 's1') net.addLink('h2', 's2') net.addLink('s1', 's2') # Assignment strategy net.mixed() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() # Network definition net.addP4Switch('s1') net.setP4Source('s1','repeater.p4') net.addHost('h1') net.addHost('h2') net.addLink('s1', 'h1') net.addLink('s1', 'h2') # Assignment strategy net.l2() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() # Network definition net.addP4Switch('s1', cli_input='s1-commands.txt') net.setP4Source('s1', 'resubmit.p4') net.addHost('h1') net.addHost('h2') net.addLink('s1', 'h1') net.addLink('s1', 'h2') # Assignment strategy net.mixed() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') # Network definition net.addP4Switch('s1') net.setP4Source('s1', './p4src/l2_basic_forwarding.p4') net.setP4CliInput('s1', './s1-commands.txt') net.addHost('h1') net.addHost('h2') net.addHost('h3') net.addHost('h4') net.addLink('s1', 'h1') net.addLink('s1', 'h2') net.addLink('s1', 'h3') net.addLink('s1', 'h4') # Assignment strategy net.l2() # Nodes general options net.disablePcapDumpAll() net.disableLogAll() net.enableCli() net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() # Network definition net.addP4Switch('s1') net.setP4Source('s1', 'p4src/recirculate.p4') net.addHost('h1') net.addHost('h2') net.addLink('s1', 'h1') net.addLink('s1', 'h2') # Assignment strategy net.l2() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() # Network definition net.addP4Switch('s1', cli_input='s1-commands.txt') net.setP4Source('s1', 'multi_queueing.p4') net.addHost('h1') net.addHost('h2') net.addHost('h3') net.addLink('s1', 'h1') net.addLink('s1', 'h2') net.addLink('s1', 'h3', bw=5) # Assignment strategy net.mixed() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() # Network definition net.addP4Switch('s1') net.setP4Source('s1', 'repeater_with_table.p4') net.setP4CliInput('s1', 's1-commands.txt') net.addHost('h1') net.addHost('h2') net.addLink('s1', 'h1') net.addLink('s1', 'h2') # Assignment strategy net.l2() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') # Network definition net.addP4Switch('s1') net.setP4Source('s1', 'reflector.p4') net.addHost('h1') net.addLink('s1', 'h1') # Assignment strategy net.l2() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() net.enableCli() net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() # Network definition net.addP4Switch('s1', cli_input='direct_commands.txt') net.setP4Source('s1', 'direct_meter.p4') net.addHost('h1') net.addHost('h2') net.addLink('s1', 'h1') net.addLink('s1', 'h2') # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()
from p4utils.mininetlib.network_API import NetworkAPI net = NetworkAPI() # Network general options net.setLogLevel('info') net.enableCli() # Network definition net.addP4Switch('s1', cli_input='s1-commands.txt') net.setP4Source('s1', 'read_write.p4') net.addHost('h1') net.addHost('h2') net.addLink('s1', 'h1') net.addLink('s1', 'h2') # Assignment strategy net.mixed() # Nodes general options net.enablePcapDumpAll() net.enableLogAll() # Start network net.startNetwork()