It is currently Thu Nov 15, 2018 4:17 am


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: 206-unable to create linux raw or generic ethernet
PostPosted: Sat Jun 21, 2014 7:32 am 
Offline

Joined: Sat Jun 21, 2014 5:10 am
Posts: 2
Hi there,

Some info on my setup:
- GNS3 0.86/also tried 0.84
- Debian Testing x64
- dynamips 0.2.12-amd64/also tried 0.28-RC3

What have I tried:
* give root permissions to dynamips.
Code:
-rwsr-xr-x 1 root root 857904 Apr 17 23:32 dynamips
Code:
zarek:GNS3$ ps -jef | grep dynamips
root     14370 14207 14204 14204  0 09:06 ?        00:00:00 dynamips -H 127.0.0.1:7200

* start gns3 with gksu prefix so that it also runs with root privileges
Code:
zarek    14203     1  3168  3168  0 08:50 ?        00:00:00 gksu gns3-old
root     14204 14203 14204 14204  0 08:50 ?        00:00:00 /usr/bin/sudo -H -S -p GNOME_SUDO_PASS -u root -- gns3-old
root     14207 14204 14204 14204  0 08:50 ?        00:00:04 /usr/bin/python /usr/bin/gns3-old

Image

This issue is also present on GNS3 1.0
Code:
[I 140621 11:13:35 router:1298] router "R1" [id=1]: adapter NM-16ESW inserted into slot 1
[I 140621 11:13:55 ethernet_switch:57] Ethernet switch "SW1" [id=1] has been created
[I 140621 11:14:14 nio_udp_auto:58] NIO UDP AUTO nio_udp_auto0 created with laddr=0.0.0.0, lport_start=10001, lport_end=20000
[I 140621 11:14:14 __init__:415] R1 [id=1] has allocated UDP port 10001 with host 0.0.0.0
[I 140621 11:14:14 nio_udp_auto:58] NIO UDP AUTO nio_udp_auto1 created with laddr=0.0.0.0, lport_start=10001, lport_end=20000
[I 140621 11:14:14 __init__:415] SW1 [id=1] has allocated UDP port 10002 with host 0.0.0.0
[I 140621 11:14:14 nio_udp_auto:126] NIO UDP AUTO nio_udp_auto0 connected to 127.0.0.1:10002
[I 140621 11:14:14 router:1466] router "R1" [id=1]: NIO nio_udp_auto0 bound to port 1/10
[I 140621 11:14:14 nio_udp_auto:126] NIO UDP AUTO nio_udp_auto1 connected to 127.0.0.1:10001
[I 140621 11:14:14 ethernet_switch:177] Ethernet switch "SW1" [id=1]: NIO nio_udp_auto1 bound to port 1
[I 140621 11:14:14 ethernet_switch:227] Ethernet switch "SW1" [id=1]: port 1 set as an access port in VLAN 1
[I 140621 11:14:21 jsonrpc_websocket:161] calling built-in method builtin.interfaces
[I 140621 11:14:37 base:213] ZeroMQ client (dynamips) sending JSON-RPC custom error: unable to create generic ethernet NIO for call id 34e14aca-0c49-4a0f-95f6-cde0a8d381c2
[I 140621 11:15:02 base:213] ZeroMQ client (dynamips) sending JSON-RPC custom error: unable to create generic ethernet NIO for call id 8450ae39-5434-421a-af88-09d48d165be9

Image

Please share any ideas. I am so stuck on this one :(




Top
 Profile  
 
 Post subject: Re: 206-unable to create linux raw or generic ethernet
PostPosted: Sat Jun 21, 2014 12:57 pm 
Offline
Site Admin

Joined: Sat Oct 11, 2008 1:41 pm
Posts: 2668
Location: Canada
Hi,

Try to set the capture capability on Dynamips: post19569.html#p19569

_________________
Jeremy, GNS3 Programmer & Benevolent Dictator for Life.


Top
 Profile  
 
 Post subject: Re: 206-unable to create linux raw or generic ethernet
PostPosted: Sat Jun 21, 2014 10:17 pm 
Offline

Joined: Sat Jun 21, 2014 5:10 am
Posts: 2
grossmj wrote:
Hi,

Try to set the capture capability on Dynamips: post19569.html#p19569


Thanks for the idea. Here's what I did:

Code:
root /usr/bin # apt-get install libcap2-bin
libcap2-bin is already the newest version.

root /usr/bin # chmod 755 dynamips
root /usr/bin # chown root.root dynamips
root /usr/bin # setcap cap_net_raw,cap_net_admin+eip dynamips
root /usr/bin # getcap dynamips
dynamips = cap_net_admin,cap_net_raw+eip

The issue is that it did not work.
Any log files that dynamips writes will not be granted to write to the current directory (/usr/bin) which does not have write permissions for normal users. See also http://forum.gns3.net/post7234.html#p7234.
So I added this:
Code:
cap_dac_override,cap_net_admin,cap_net_raw+eip

What cap_dac_override does is:
Bypass file read, write, and execute permission checks. (DAC is an abbreviation of "discretionary access control".)
Without write permissions I got theese error messages:
Quote:
Unable to create lock file "c7200_i0_lock".
VM default: unable to create instance!
c7200: unable to create instance default!

But I still receive the error.
Image
Later edit:
Found my error.
When adding interfaces to the cloud in Linux make sure not to add it like this:
nio_gen_eth lo100
in Linux subinterface indexes are separated by a colon (:) between the name of the interface and it's index:
nio_gen_eth lo:100
The only settings I will keep is:
Code:
cap_dac_override,cap_net_admin,cap_net_raw+eip

That way, the dynamips binary has the proper permissions.
and just let the default file permissions as is:
Code:
root /usr/bin # stat dynamips
  File: ‘dynamips’
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)

After doing that I added two interfaces (one tap0 and one lo:101):
Image
Then at the terminal I had to make then:
Note: For installing tap devices I used this guide.
Code:
ifconfig tap0 10.100.100.100 netmask 255.255.255.0 up
ifconfig lo:101 10.100.100.101 netmask 255.255.255.0 up

Then I started the router and configured the e0/0 interface with the ip address 10.100.100.101, and after the no shut command.
Ping worked.




Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO