Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Activating on Linux without eth0

Asked by Daniel on 29 Apr 2013

I have an activation question. I have asked technical support, but I thought I would ask here. I thought this would be desirable both in terms of speed for me and potentially to share the issue for others ...

I run Arch Linux. Arch Linux has switched to the new standard of Consistent Network Device Naming where network devices are no longer named eth0, eth1, wlan0, wlan1. Both 1-661QJD and 1-EUTG50 are relevant and highlight the problem. For activation on Linux, TMW requires the legacy eth0 naming convention.

For Red Hat, TMW suggests removing the package that implements consistent network device naming. This is not an option on Arch. does anyone know a work around? Does anyone know a work around that does not require disabling consistent network device naming? I thought it used to be possible to activate with the UUID of a harddisk...

5 Comments

Walter Roberson on 29 Apr 2013

Select the lowest-numbered motherboard ethernet, em*

There is a chance that a hard-link will cause problems (it would not have in earlier Unix). If it does, then use "ls -l" to find the major and minor device numbers of the em* interface, and then mknod eth0 with the same major and minor numbers.

Daniel on 29 Apr 2013

Let me be clearer. I expected to find the controller in /dev (because I expect to find everything in /dev). A find / -name *enp0s25* where enp0s25 is the equivalent to eth0, turns up something in /sys/devices and /sys/class as well as a lot of entries in /proc/*. Are you suggesting I hardlink the /sys/devices entry?

Walter Roberson on 29 Apr 2013

Hmmm, apparently device files for ethernet have changed considerably ... I cannot find any on my OS-X system! I guess it must be using system calls to find the ethernet table. If something similar is what is happening on your system, then creating a new file might not help at all :(

Daniel

Products

No products are associated with this question.

2 Answers

Answer by Daniel on 29 Apr 2013
Edited by Daniel on 2 May 2013
Accepted answer

I asked a related question over at Unix and Linux.SE. Basically, for Linux the dummy kernel module will create a dummy network interface that you can then set the mac address of

modprobe dummy
ip l set dev dummy0 name eth0
ip link set dev eth0 address xx:xx:xx:xx:xx:xx

where xx:xx:xx:xx:xx:xx is the registered mac address/host id of the machine. I don't think that this violates the license agreement, although it is best to check.

I don't know the best way to make this persistent across reboots, but it shouldn't be too hard.

It might also be possible to simply rename one of the consistently named devices to eth0. This would eliminate the need for the dummy device and I believe the naming would still be consistent since you are always renaming the same device.

I have also been told that a udev rule can be used to revert back to ethX type naming. For machines that only have eth0 and/or wlan0 there is no advantage of consistent device naming since there is only one device. This means the udev rule does not hurt anything.

I have also had a response from TMW. Activation based on UUID of the hard drive is a Windows only feature. TMW offered to create me a custom license file based on the machine's hostname. This doesn't scale very well, but it means I don't have to manipulate the machine itself, which I like.

0 Comments

Daniel
Answer by A on 7 Sep 2013
Edited by A on 7 Sep 2013

I run Gentoo linux, and consistent NIC naming has been introduced since udev v197 I think. So activation was an issue for me as I had no eth0 device on my system.

My work-around was to create a udev rule to force the name eth0.

I have the following in /etc/udev/rules.d/70-use-eth0-for-matlab-licensing.rules (one line):

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="your:mac:address:here", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth?", NAME="eth0"

You can find the mac address of your device by running 'ifconfig -a'. Keep it in lower-case. I used my ethernet NIC's mac, as I hardly use it, so I'm hoping this won't have unintended consequences for the rest of my system.

You'll need to keep this work-around for as long as you use matlab (not just for activation), as the licensing info is verified at launch, so it needs to find eth0 every time.

You may have to update a /etc/init.d/net.* link and /etc/conf.d/net to use the new name.

0 Comments

A

Contact us