You are not logged in.

#1 2014-05-09 03:28:44

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 303
Website

"soft" netctl static IP configuration?

My box has two ethernet interfaces. One is configured as DHCP client to upstream -- that's fine.
The second interface is configured with a static IP, but the Ethernet cable is only connected sometimes.
If I try to bring up the interface while the cable is disconnected, I get a "No connection found" error. It works when the cable is connected.

Is there a way to set up a netctl profile that's like a soft-mount, so it gets re-enabled every time the cable gets reconnected?

My /etc/netctl/enp3s0 looks like this:

Description='aha'
Interface=enp3s0
Connection=ethernet
IP=static
Address=('192.168.139.1/24')
DNS=('192.168.139.1')

Offline

#2 2014-05-09 04:12:29

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: "soft" netctl static IP configuration?

There is the netctl-ifplugd@.service which can be bound to a given interface.

Offline

#3 2014-05-09 21:17:47

branch
Member
Registered: 2014-03-16
Posts: 209

Re: "soft" netctl static IP configuration?

Another option is to set the following in the netctl profile:

SkipNoCarrier=yes

Since the DNS server is the local machine (why not just use 127.0.0.1) and the interface has no gateway, this should be sufficient.

Offline

Board footer

Powered by FluxBB