As a side note, separated from the above but I finally found out why a Router won't start after you save its config on a new start of GNS3. Dynamips binds to 0.0.0.0 for 7120 port even if in Configuration I have it set to 127.0.0.1 (running GNS3 in privileged mode). I think we should patch to add 0.0.0.0 as a global address which is acceptable for 127.0.0.1 to workaround this (may not be the best solution).
Traceback is:
Code:
=> 12:44:58: DEBUG (1): sending to dynamips at 127.0.0.1:7210 -> nio get_stats nio_udp6
12:44:58: DEBUG (1): returned -> ['100-0 0 0 0']
12:44:58: DEBUG (1): sending to dynamips at 127.0.0.1:7210 -> nio get_stats nio_tap0
12:44:58: DEBUG (1): returned -> ['100-0 0 0 0']
12:44:59: DEBUG (1): sending to dynamips at 127.0.0.1:7210 -> vm start R11
12:44:59: DEBUG (1): returned -> ["209-unable to start VM instance 'R11'"]
---------Traceback lines (saved in exception.log)----------
Traceback (most recent call last):
File "/usr/share/gns3/GNS3/Scene.py", line 725, in slotStartNode
item.startNode()
File "/usr/share/gns3/GNS3/Node/IOSRouter.py", line 608, in startNode
self.router.start()
File "/usr/share/gns3/GNS3/Dynagen/dynamips_lib.py", line 2347, in start
r = send(self.__d, 'vm start %s' % self.__name)
File "/usr/share/gns3/GNS3/Dynagen/dynamips_lib.py", line 4998, in send
raise DynamipsError, data[-1]
DynamipsError: 209-unable to start VM instance 'R11'
-----------------------------------------------------------
dynamips state is:
Code:
tcp 0 0 0.0.0.0:7210 0.0.0.0:* LISTEN 8311/dynamips
tcp 0 0 127.0.0.1:7210 127.0.0.1:37605 ESTABLISHED 8311/dynamips
tcp 0 0 127.0.0.1:37605 127.0.0.1:7210 ESTABLISHED 8294/python
tcp 1 0 127.0.0.1:7210 127.0.0.1:37597 CLOSE_WAIT 8311/dynamips
Note the 0.0.0.0 bind. Seems it wants to send to localhost but gets 0.0.0.0 returned so upon
send() call it will return an error. I need to find the call function which calls this one to debug the data that it fetches or reads on. Probably is better to exlucde 0.0.0.0
Problem is after many tries you will have a CLOSE_WAIT socket (see the "1" above for CLOSE_WAIT on Recv-Q --- this is
similar --very similar-- to what I have presented above regarding switches... this points to dynamips communication issues) and thus you won't be able to start at all the router instance
Code:
tcp 1 0 127.0.0.1:7210 127.0.0.1:37597 CLOSE_WAIT 8311/dynamips
Code:
12:54:32: DEBUG (1): sending to dynamips at 127.0.0.1:7210 -> vm start R11
12:54:32: DEBUG (1): returned -> ["209-unable to start VM instance 'R11'"]
---------Traceback lines (saved in exception.log)----------
Traceback (most recent call last):
File "/usr/share/gns3/GNS3/Scene.py", line 725, in slotStartNode
item.startNode()
File "/usr/share/gns3/GNS3/Node/IOSRouter.py", line 608, in startNode
self.router.start()
File "/usr/share/gns3/GNS3/Dynagen/dynamips_lib.py", line 2347, in start
r = send(self.__d, 'vm start %s' % self.__name)
File "/usr/share/gns3/GNS3/Dynagen/dynamips_lib.py", line 4998, in send
dynamips.configchange = True
DynamipsError: 209-unable to start VM instance 'R11'
-----------------------------------------------------------
By the way, as a suggestion you could implement Sphinx ReST type of documentation in your Python code which you can automate and dynamically build HTML documentation for all of us instead of letting us to reverse engineer your code. It would be much more useful. Hope it helps :-).