Wlan with wpa_supplicant under NixOS?
up vote
1
down vote
favorite
How to set up networking (wlan) with wpa_supplicant on NixOS? Whenever I try to connect to my local wlan network, I get CONN_FAILED
as reason, which is a bit uninformative. It also tells me that my pks
is not valid (WRONG_KEY
) but I trible confirmed that it is right and I used the configuration with the very same key (git version controlled) on the network on my Archlinux box before and it worked.
networking wireless-networking wpa-supplicant
add a comment |
up vote
1
down vote
favorite
How to set up networking (wlan) with wpa_supplicant on NixOS? Whenever I try to connect to my local wlan network, I get CONN_FAILED
as reason, which is a bit uninformative. It also tells me that my pks
is not valid (WRONG_KEY
) but I trible confirmed that it is right and I used the configuration with the very same key (git version controlled) on the network on my Archlinux box before and it worked.
networking wireless-networking wpa-supplicant
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
How to set up networking (wlan) with wpa_supplicant on NixOS? Whenever I try to connect to my local wlan network, I get CONN_FAILED
as reason, which is a bit uninformative. It also tells me that my pks
is not valid (WRONG_KEY
) but I trible confirmed that it is right and I used the configuration with the very same key (git version controlled) on the network on my Archlinux box before and it worked.
networking wireless-networking wpa-supplicant
How to set up networking (wlan) with wpa_supplicant on NixOS? Whenever I try to connect to my local wlan network, I get CONN_FAILED
as reason, which is a bit uninformative. It also tells me that my pks
is not valid (WRONG_KEY
) but I trible confirmed that it is right and I used the configuration with the very same key (git version controlled) on the network on my Archlinux box before and it worked.
networking wireless-networking wpa-supplicant
networking wireless-networking wpa-supplicant
asked Jul 6 '15 at 20:16
musicmatze
1084
1084
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
5
down vote
accepted
I doubt it will become any more informative than what you already have, yet here we go.
First we need to store our WPA2-PSK secrets:
wpa_passphrase MyWifiSSID MySecretPassword > wpa_supplicant.conf
Now make sure you have stopped a Network Manager, if you use one, and issue all the following commands as sudo. We clean the interface (I call it wlan0):
ip link set dev wlan0 down
ip addr flush dev wlan0
ip link set dev wlan0 up
Now we associate to the AP:
wpa_supplicant -B -i wlan0 -Dnl80211 -c wpa_supplicant.conf
dhclient wlan0
If the network is correctly configured, then you are done. If there are some errors in the DHCP configuration, you may be missing either the default gateway or the DNS servers. You can set them just as I am about to do in the case of a static IP.
If you do not have a DHCP server, or if you wish to give yourself a static IP (say, 192.168.1.200), then skip the last command above, and issue instead
ip addr add 192.168.1.200/24 dev wlan0
Remember, 24
is the network mask in CIDR notation. If yours differs, please adjust accordingly. Once this is done, you will need a default gateway:
ip route add default via 192.168.1.1 dev wlan0
where 192.168.1.1 is the address of your home router/gateway, and DNS servers,
echo nameserver 8.8.8.8 >> /etc/resolv.conf
echo nameserver 8.8.4.4 >> /etc/resolv.conf
This is it.
I will try this out asap, hang tight!
– musicmatze
Jul 8 '15 at 18:42
This works, I get wlan, but I still cannot ping in my internal network.
– musicmatze
Jul 11 '15 at 7:47
@musicmatze Perhaps dhcpd isn't running? Or not on that interface?
– Daniel Jour
Nov 25 '15 at 19:26
1
@DanielJour No, that's not the problem. Most likely he did not setup a default gateway and the DNS servers.
– MariusMatutiae
Nov 25 '15 at 22:31
It works now. I'm not sure about DNS or gateway... I'll mark this as appropriate answer.
– musicmatze
Nov 27 '15 at 10:30
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
I doubt it will become any more informative than what you already have, yet here we go.
First we need to store our WPA2-PSK secrets:
wpa_passphrase MyWifiSSID MySecretPassword > wpa_supplicant.conf
Now make sure you have stopped a Network Manager, if you use one, and issue all the following commands as sudo. We clean the interface (I call it wlan0):
ip link set dev wlan0 down
ip addr flush dev wlan0
ip link set dev wlan0 up
Now we associate to the AP:
wpa_supplicant -B -i wlan0 -Dnl80211 -c wpa_supplicant.conf
dhclient wlan0
If the network is correctly configured, then you are done. If there are some errors in the DHCP configuration, you may be missing either the default gateway or the DNS servers. You can set them just as I am about to do in the case of a static IP.
If you do not have a DHCP server, or if you wish to give yourself a static IP (say, 192.168.1.200), then skip the last command above, and issue instead
ip addr add 192.168.1.200/24 dev wlan0
Remember, 24
is the network mask in CIDR notation. If yours differs, please adjust accordingly. Once this is done, you will need a default gateway:
ip route add default via 192.168.1.1 dev wlan0
where 192.168.1.1 is the address of your home router/gateway, and DNS servers,
echo nameserver 8.8.8.8 >> /etc/resolv.conf
echo nameserver 8.8.4.4 >> /etc/resolv.conf
This is it.
I will try this out asap, hang tight!
– musicmatze
Jul 8 '15 at 18:42
This works, I get wlan, but I still cannot ping in my internal network.
– musicmatze
Jul 11 '15 at 7:47
@musicmatze Perhaps dhcpd isn't running? Or not on that interface?
– Daniel Jour
Nov 25 '15 at 19:26
1
@DanielJour No, that's not the problem. Most likely he did not setup a default gateway and the DNS servers.
– MariusMatutiae
Nov 25 '15 at 22:31
It works now. I'm not sure about DNS or gateway... I'll mark this as appropriate answer.
– musicmatze
Nov 27 '15 at 10:30
add a comment |
up vote
5
down vote
accepted
I doubt it will become any more informative than what you already have, yet here we go.
First we need to store our WPA2-PSK secrets:
wpa_passphrase MyWifiSSID MySecretPassword > wpa_supplicant.conf
Now make sure you have stopped a Network Manager, if you use one, and issue all the following commands as sudo. We clean the interface (I call it wlan0):
ip link set dev wlan0 down
ip addr flush dev wlan0
ip link set dev wlan0 up
Now we associate to the AP:
wpa_supplicant -B -i wlan0 -Dnl80211 -c wpa_supplicant.conf
dhclient wlan0
If the network is correctly configured, then you are done. If there are some errors in the DHCP configuration, you may be missing either the default gateway or the DNS servers. You can set them just as I am about to do in the case of a static IP.
If you do not have a DHCP server, or if you wish to give yourself a static IP (say, 192.168.1.200), then skip the last command above, and issue instead
ip addr add 192.168.1.200/24 dev wlan0
Remember, 24
is the network mask in CIDR notation. If yours differs, please adjust accordingly. Once this is done, you will need a default gateway:
ip route add default via 192.168.1.1 dev wlan0
where 192.168.1.1 is the address of your home router/gateway, and DNS servers,
echo nameserver 8.8.8.8 >> /etc/resolv.conf
echo nameserver 8.8.4.4 >> /etc/resolv.conf
This is it.
I will try this out asap, hang tight!
– musicmatze
Jul 8 '15 at 18:42
This works, I get wlan, but I still cannot ping in my internal network.
– musicmatze
Jul 11 '15 at 7:47
@musicmatze Perhaps dhcpd isn't running? Or not on that interface?
– Daniel Jour
Nov 25 '15 at 19:26
1
@DanielJour No, that's not the problem. Most likely he did not setup a default gateway and the DNS servers.
– MariusMatutiae
Nov 25 '15 at 22:31
It works now. I'm not sure about DNS or gateway... I'll mark this as appropriate answer.
– musicmatze
Nov 27 '15 at 10:30
add a comment |
up vote
5
down vote
accepted
up vote
5
down vote
accepted
I doubt it will become any more informative than what you already have, yet here we go.
First we need to store our WPA2-PSK secrets:
wpa_passphrase MyWifiSSID MySecretPassword > wpa_supplicant.conf
Now make sure you have stopped a Network Manager, if you use one, and issue all the following commands as sudo. We clean the interface (I call it wlan0):
ip link set dev wlan0 down
ip addr flush dev wlan0
ip link set dev wlan0 up
Now we associate to the AP:
wpa_supplicant -B -i wlan0 -Dnl80211 -c wpa_supplicant.conf
dhclient wlan0
If the network is correctly configured, then you are done. If there are some errors in the DHCP configuration, you may be missing either the default gateway or the DNS servers. You can set them just as I am about to do in the case of a static IP.
If you do not have a DHCP server, or if you wish to give yourself a static IP (say, 192.168.1.200), then skip the last command above, and issue instead
ip addr add 192.168.1.200/24 dev wlan0
Remember, 24
is the network mask in CIDR notation. If yours differs, please adjust accordingly. Once this is done, you will need a default gateway:
ip route add default via 192.168.1.1 dev wlan0
where 192.168.1.1 is the address of your home router/gateway, and DNS servers,
echo nameserver 8.8.8.8 >> /etc/resolv.conf
echo nameserver 8.8.4.4 >> /etc/resolv.conf
This is it.
I doubt it will become any more informative than what you already have, yet here we go.
First we need to store our WPA2-PSK secrets:
wpa_passphrase MyWifiSSID MySecretPassword > wpa_supplicant.conf
Now make sure you have stopped a Network Manager, if you use one, and issue all the following commands as sudo. We clean the interface (I call it wlan0):
ip link set dev wlan0 down
ip addr flush dev wlan0
ip link set dev wlan0 up
Now we associate to the AP:
wpa_supplicant -B -i wlan0 -Dnl80211 -c wpa_supplicant.conf
dhclient wlan0
If the network is correctly configured, then you are done. If there are some errors in the DHCP configuration, you may be missing either the default gateway or the DNS servers. You can set them just as I am about to do in the case of a static IP.
If you do not have a DHCP server, or if you wish to give yourself a static IP (say, 192.168.1.200), then skip the last command above, and issue instead
ip addr add 192.168.1.200/24 dev wlan0
Remember, 24
is the network mask in CIDR notation. If yours differs, please adjust accordingly. Once this is done, you will need a default gateway:
ip route add default via 192.168.1.1 dev wlan0
where 192.168.1.1 is the address of your home router/gateway, and DNS servers,
echo nameserver 8.8.8.8 >> /etc/resolv.conf
echo nameserver 8.8.4.4 >> /etc/resolv.conf
This is it.
edited Nov 22 at 11:04
answered Jul 8 '15 at 9:51
MariusMatutiae
37.9k95195
37.9k95195
I will try this out asap, hang tight!
– musicmatze
Jul 8 '15 at 18:42
This works, I get wlan, but I still cannot ping in my internal network.
– musicmatze
Jul 11 '15 at 7:47
@musicmatze Perhaps dhcpd isn't running? Or not on that interface?
– Daniel Jour
Nov 25 '15 at 19:26
1
@DanielJour No, that's not the problem. Most likely he did not setup a default gateway and the DNS servers.
– MariusMatutiae
Nov 25 '15 at 22:31
It works now. I'm not sure about DNS or gateway... I'll mark this as appropriate answer.
– musicmatze
Nov 27 '15 at 10:30
add a comment |
I will try this out asap, hang tight!
– musicmatze
Jul 8 '15 at 18:42
This works, I get wlan, but I still cannot ping in my internal network.
– musicmatze
Jul 11 '15 at 7:47
@musicmatze Perhaps dhcpd isn't running? Or not on that interface?
– Daniel Jour
Nov 25 '15 at 19:26
1
@DanielJour No, that's not the problem. Most likely he did not setup a default gateway and the DNS servers.
– MariusMatutiae
Nov 25 '15 at 22:31
It works now. I'm not sure about DNS or gateway... I'll mark this as appropriate answer.
– musicmatze
Nov 27 '15 at 10:30
I will try this out asap, hang tight!
– musicmatze
Jul 8 '15 at 18:42
I will try this out asap, hang tight!
– musicmatze
Jul 8 '15 at 18:42
This works, I get wlan, but I still cannot ping in my internal network.
– musicmatze
Jul 11 '15 at 7:47
This works, I get wlan, but I still cannot ping in my internal network.
– musicmatze
Jul 11 '15 at 7:47
@musicmatze Perhaps dhcpd isn't running? Or not on that interface?
– Daniel Jour
Nov 25 '15 at 19:26
@musicmatze Perhaps dhcpd isn't running? Or not on that interface?
– Daniel Jour
Nov 25 '15 at 19:26
1
1
@DanielJour No, that's not the problem. Most likely he did not setup a default gateway and the DNS servers.
– MariusMatutiae
Nov 25 '15 at 22:31
@DanielJour No, that's not the problem. Most likely he did not setup a default gateway and the DNS servers.
– MariusMatutiae
Nov 25 '15 at 22:31
It works now. I'm not sure about DNS or gateway... I'll mark this as appropriate answer.
– musicmatze
Nov 27 '15 at 10:30
It works now. I'm not sure about DNS or gateway... I'll mark this as appropriate answer.
– musicmatze
Nov 27 '15 at 10:30
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f937059%2fwlan-with-wpa-supplicant-under-nixos%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown