Add a new controller, switch, two hosts
mininet> py net.addController('c2', IP="127.0.0.2", port=6633)
mininet> py net.addSwitch('s2')
mininet> py s2.start([c2])
mininet> py net.addHost('h4')
mininet> py net.addLink(s2, net.get('h4'))
mininet> py s2.attach('s2-eth1')
mininet> py net.get('h4').cmd('ifconfig h4-eth0 10.4')
mininet> py net.addHost('h5')
mininet> py net.addLink(s2, net.get('h5'))
mininet> py s2.attach('s2-eth2')
mininet> py net.get('h5').cmd('ifconfig h5-eth0 10.5')
mininet> py net.addController('c2', IP="127.0.0.2", port=6633)
mininet> py net.addSwitch('s2')
mininet> py s2.start([c2])
mininet> py net.addHost('h4')
mininet> py net.addLink(s2, net.get('h4'))
mininet> py s2.attach('s2-eth1')
mininet> py net.get('h4').cmd('ifconfig h4-eth0 10.4')
mininet> py net.addHost('h5')
mininet> py net.addLink(s2, net.get('h5'))
mininet> py s2.attach('s2-eth2')
mininet> py net.get('h5').cmd('ifconfig h5-eth0 10.5')
I would add:
ReplyDeletepy net.get('h4').setIP('10.4')
py net.get('h5').setIP('10.5')
This allows the pingall command to work. Pingall fails for me without those additions.
Hi, thanks for the code. When I run the "py net.addController('c2', IP="127.0.0.2", port=6633)" command to add the second controller, I receive the " 'list' object is not callable". Do you know what would be the issue?
ReplyDeleteThanks