You are not logged in.

#1 2013-04-29 18:43:23

daniel_shub
Member
Registered: 2012-06-21
Posts: 96

Create persistent dummy eth0 device

I run the proprietary MATLAB software which checks a license file against the mac address of eth0 in an attempt to prevent piracy. The switch to consistent network device naming means I no longer have a eth0 network adapter. Piecing together information I have gather from various forums has lead me to

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

I guess the first question is, is this the best way to do it in Arch? The second question is how do I make this persistent across reboots? I understand how to load the module (I think): I am planning on creating a file in /etc/modules-load.d/dummy.conf with the contents dummy to take care of the module loading. To set the name would it be reasonable to do create something like /etc/systemd/system/dummy.service

[Unit]
Description=Create dummy network interface

[Service]
Type=oneshot
ExecStart=/usr/sbin/ip l set dev dummy0 name eth0
ExecStart=/usr/sbin/ip link set dev eth0 address xx:xx:xx:xx:xx:xx
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

Note I stole the above from https://wiki.archlinux.org/index.php/Sy … cuous_mode and do not understand the RemainAfterExit and WantedBy parts ...

How do I make sure this waits for the dummy kernel module to finish loading?

Last edited by daniel_shub (2013-04-29 18:44:16)

Offline

#2 2013-04-29 18:50:27

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Create persistent dummy eth0 device

you can create a udev rule under the /etc/udev/rules.d/ which will reset your interface names to eth0, wlan0 etc... and not provide you with predictive naming scheme.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2013-04-30 11:40:46

daniel_shub
Member
Registered: 2012-06-21
Posts: 96

Re: Create persistent dummy eth0 device

But isn't consistent naming a good thing? It seems silly to disable it simply to run one piece of software.

Offline

#4 2013-04-30 12:01:45

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Create persistent dummy eth0 device

Does predictable net naming actually benefit you? If you're only using one network device, the answer is no, and you can quite safely turn it off. Creating a dummy interface for one dumb piece of proprietary software is a lot sillier IMO.

Offline

Board footer

Powered by FluxBB