Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Using CentOS 6 I cannot get my WiFi interface to configure over DHCP. Here is my ifcfg-wlan0:

This does not work (although it is correct):

DEVICE=wlan0
BOOTPROTO=dhcp
ONBOOT=yes
HWADDR=xx:xx:xx:xx:xx:xx
TYPE=Wireless

This works:

DEVICE=wlan0
BOOTPROTO=none
ONBOOT=yes
IPADDR=192.168.0.253
NETMASK=255.255.255.0
DNS1=192.168.0.99
GATEWAY=192.168.0.99
HWADDR=xx:xx:xx:xx:xx:xx
TYPE=Wireless

I don't want a static IP address, I want a DHCP assigned address.


Update: Both of the above configs are correct.

Please don't downvote, this really didn't work for me. It must be a bug in CentOS or my wireless driver. See my answer for details.

share|improve this question
I downvoted (and voted to close) because this seems like an end-user issue and not one of a systems admin. – MDMarra Oct 12 '12 at 1:35
@MDMarra just because I am using WiFi doesn't mean I am not a systems administrator – dongle26 Oct 12 '12 at 2:01
So you have a fleet of CentOS6 workstations that you're deploying professionally across your workplace that are having this issue? – MDMarra Oct 12 '12 at 2:18
@MDMara I wouldn't say a fleet, but just one. If you are that pent up about it, flag for moving to superuser.com – dongle26 Oct 12 '12 at 2:24
1  
I've already voted to migrate. I was just explaining that not everything Linux related is topical here, that's all. We have a well-defined faq that's worth a read. – MDMarra Oct 12 '12 at 2:32

closed as off topic by MDMarra, Michael Hampton, Chris S Oct 12 '12 at 2:42

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

There must be a bug with my wireless card. The above config is correct and sometimes does work. Solution: add this line to /etc/rc.local:

dhclient wlan0

This always works for me.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.