You are not logged in.

#1 2017-03-02 10:04:31

peerjip
Member
Registered: 2013-05-06
Posts: 2

netctl assign multiple ip addresses to one device (dhcp, static)

Hey,

i try to assign 2 netctl profiles to one device, one dhcp and one static. Unfortunately this fails with

Description='A basic static ethernet connection'
Interface=eth0
Connection=ethernet
IP=static
Address=('192.168.0.123/24')
#Routes=('192.168.0.0/24 via 192.168.0.123')
Gateway='192.168.0.1'
DNS=('192.168.0.1')

Description='A basic dhcp ethernet connection'
Interface=eth0
Connection=ethernet
IP=dhcp



$ netctl start ethernet-static
$ netctl start ethernet-dhcp
Mar 02 10:47:28 rsp systemd[1]: Starting A basic dhcp ethernet connection...
Mar 02 10:47:28 rsp network[1270]: Starting network profile 'ethernet-dhcp'...
Mar 02 10:47:28 rsp network[1270]: The interface of network profile 'ethernet-dhcp' is already up
Mar 02 10:47:28 rsp systemd[1]: netctl@ethernet\x2ddhcp.service: Main process exited, code=exited, status=1/FAILURE
Mar 02 10:47:28 rsp systemd[1]: Failed to start A basic dhcp ethernet connection.
Mar 02 10:47:28 rsp systemd[1]: netctl@ethernet\x2ddhcp.service: Unit entered failed state.
Mar 02 10:47:28 rsp systemd[1]: netctl@ethernet\x2ddhcp.service: Failed with result 'exit-code'.

so to me it looks like netctl tries to bring up the network device a second time, which fails as it was already brought up.

Any suggestions on how to work around this issue?

Offline

#2 2017-03-02 11:55:46

peerjip
Member
Registered: 2013-05-06
Posts: 2

Re: netctl assign multiple ip addresses to one device (dhcp, static)

Ok, found the solution. there is an option called "ForceConnect" which allows to configure interface which are already brought up.

Refer to man-page of netctl.profile.

Offline

Board footer

Powered by FluxBB