You are not logged in.

#1 2018-06-10 19:02:27

diederick76
Member
Registered: 2010-02-14
Posts: 157

Netctl unit naming

Hi all,

I have a basic static wired ethernet connection on a machine that I use as a NAS, defined in a file /etc/netctl/ethernet-static:

Description='A basic static ethernet connection'
Interface=eno1
Connection=ethernet
IP=static
Address=('192.168.1.100/24')
Routes=('192.168.0.0/24 via 192.168.1.2')
Gateway='192.168.1.1'
DNS=('192.168.1.1')

It has an associated systemctl unit named: netctl@ethernet\x2dstatic.service

The machine has another NIC that I would like to use in the same manner, with a different IP. To do that, I would like to change the name of the systemd unit into something resembling the name of the NIC. Is that possible?

Offline

#2 2018-06-10 19:36:52

seth
Member
Registered: 2012-09-03
Posts: 50,006

Re: Netctl unit naming

Not sure whether that's whatyou mean, but you can name the profiles whatever you want, eg.
/etc/netctl/static-eno1-100
/etc/netctl/static-enp63s0-101
The systemd service will reflect this.

Online

#3 2018-06-10 20:07:23

diederick76
Member
Registered: 2010-02-14
Posts: 157

Re: Netctl unit naming

Yes, that is what I meant. Thanks. I tried it before but I think I forgot to disable the old unit and enable the new one.

Offline

Board footer

Powered by FluxBB