Re: How to prevent bringing interface up on system startup and be able to bring it up manually
Роман Мещеряков
Tue May 30 07:21:10 2017Thank you Roy, your answer helped me a lot! Before your answer I didn’t realize that establishing physical Wi-Fi connection is not a dhcpcd’s job. After realizing that and spending some time searching through Internet and experimenting, I understood that command
sudo ifup wlan0
brings up wlan0 and establishes Wi-Fi connecting, and after that call
sudo dhcpcd --rebind wlan0
acquires IP address for wlan0.
In order for wlan0’s default route to take precedence over eth0's one, I changed my /etc/dhcpcd.conf as follows:
…
# Automatically bring up only eth0
allowinterfaces eth0
interface eth0
metric 2
interface wlan0
metric 1
So now everything is working perfectly! Again, thank you Roy very much!
On 29/05/17 12:16, Роман Мещеряков wrote:*2017-05-29T13:05:40.885326+03:00 masternoinit dhcpcd[599]: wlan0:
carrier lost*
*2017-05-29T13:05:40.885981+03:00 masternoinit dhcpcd[599]: wlan0:
executing `/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER*
*2017-05-29T13:05:40.931528+03:00 masternoinit dhcpcd[599]: wlan0:
deleting address fe80::24a3:7e0e:3683:c71f*
**
*So I don’t know what is the problem with my configuration. Roy and
others, I would be very grateful for your help!*
Looks like the problem is a lack of carrier.
This is outside the scope of dhcpcd.
However, you can check the status of the wireless connection.
Here's the output from Ubuntu 17 from my holiday apartment.
$ wpa_cli status
Selected interface 'wlan0'
bssid=30:d1:7e:6b:bc:64
freq=2412
ssid=Avatel Blq.G 9
id=1
mode=station
pairwise_cipher=CCMP
group_cipher=TKIP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.168.100.3
address=00:21:6b:ad:ab:38
uuid=dd168a6e-716c-5809-b909-b02e03fc140e
The key part here is wpa_state = COMPLETED which means wireless is up
and running.
Roy