Exception: Error creating interface pair (s2-eth5,s3-eth1): RTNETLINK answers: File exists
See original GitHub issueHi,
I’m using mininet I created a topology using miniedit and generated a script (minitopo.py)
and i’m getting this error when executing the script
Traceback (most recent call last):
File "minitopo1.py", line 70, in <module>
myNetwork()
File "minitopo1.py", line 49, in myNetwork
net.addLink(s2, s3)
File "/home/mininet/mininet/mininet/net.py", line 364, in addLink
link = cls( node1, node2, **options )
File "/home/mininet/mininet/mininet/link.py", line 424, in __init__
node1, node2, deleteIntfs=False )
File "/home/mininet/mininet/mininet/link.py", line 468, in makeIntfPair
deleteIntfs=deleteIntfs )
File "/home/mininet/mininet/mininet/util.py", line 194, in makeIntfPair
( intf1, intf2, cmdOutput ) )
Exception: Error creating interface pair (s2-eth5,s3-eth1): RTNETLINK answers: File exists
I’ve tried to use it without the remote controller, and had the same problem , there’s something wrong in creating the links between (s2,s3) and (s4,s3)
here’s the script (minitopo.py) ,
#!/usr/bin/python
from mininet.net import Mininet
from mininet.node import Controller, RemoteController, OVSController
from mininet.node import CPULimitedHost, Host, Node
from mininet.node import OVSKernelSwitch, UserSwitch
from mininet.node import IVSSwitch
from mininet.cli import CLI
from mininet.log import setLogLevel, info
from mininet.link import TCLink, Intf
from subprocess import call
def myNetwork():
net = Mininet( topo=None,
build=False,
ipBase='10.0.0.0/8')
info( '*** Adding controller\n' )
c1=net.addController(name='c1',
controller=Controller,
protocol='tcp',
port=6633)
info( '*** Add switches\n')
s2 = net.addSwitch('s2', cls=OVSKernelSwitch)
s4 = net.addSwitch('s4', cls=OVSKernelSwitch)
s3 = net.addSwitch('s3', cls=OVSKernelSwitch)
info( '*** Add hosts\n')
h7 = net.addHost('h7', cls=Host, ip='10.0.0.7', defaultRoute=None)
h2 = net.addHost('h2', cls=Host, ip='10.0.0.2', defaultRoute=None)
h3 = net.addHost('h3', cls=Host, ip='10.0.0.3', defaultRoute=None)
h4 = net.addHost('h4', cls=Host, ip='10.0.0.4', defaultRoute=None)
h6 = net.addHost('h6', cls=Host, ip='10.0.0.6', defaultRoute=None)
h5 = net.addHost('h5', cls=Host, ip='10.0.0.5', defaultRoute=None)
h8 = net.addHost('h8', cls=Host, ip='10.0.0.8', defaultRoute=None)
h1 = net.addHost('h1', cls=Host, ip='10.0.0.1', defaultRoute=None)
info( '*** Add links\n')
net.addLink(s2, h4)
net.addLink(s2, h3)
net.addLink(s2, h2)
net.addLink(s2, h1)
net.addLink(s4, h5)
net.addLink(s4, h6)
net.addLink(s4, h7)
net.addLink(s4, h8)
net.addLink(s2, s3)
net.addLink(s3, s4)
info( '*** Starting network\n')
net.build()
info( '*** Starting controllers\n')
for controller in net.controllers:
controller.start()
info( '*** Starting switches\n')
net.get('s2').start([])
net.get('s4').start([])
net.get('s3').start([c1])
info( '*** Post configure switches and hosts\n')
CLI(net)
net.stop()
if __name__ == '__main__':
setLogLevel( 'info' )
myNetwork()
could you please telle me what’s wrong ?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Exception Error in mininet - python
Exception : Error creating interface pair (s1-eth1,h1-eth0): RTNETLINK answers: File exists. what is it and how can I solve it?
Read more >RTNETLINK "file exists" error when attempting to create ...
This issue is reproducible but is due to choosing a name which interferes with the default choice made by the kernel.
Read more >Error creating interface pair (s2-eth5,s3-eth1): RTNETLINK ...
Mininet/Containernet Problem: Exception: Error creating interface pair (s2-eth5,s3-eth1): RTNETLINK answers: File exists.
Read more >Exception: Error creating interface pair (s2-eth5,s3-eth1)
Exception : Error creating interface pair (s2-eth5,s3-eth1): RTNETLINK answers: File exists.
Read more >"RTNETLINK answers: File exists" /etc/network/interfaces ...
Edit your configuration file to remove the spaces before the iface stanza so that it looks like this, auto eth0 iface eth0 inet...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Can you use “sudo mn -c” to clean your env and try again ?
Remove the Previous topology by using sudo mn -c