Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a Arch Linux system on my home network and its MAC address is setup in my Linksys running DD-WRT to receive a static lease. However, this system is not getting the static lease from the DD-WRT, but rather a random ip from the dynamic pool. I tried various things, like forcing a lease renewal, but to no avail. How should I go about troubleshooting this problem? Running Arch Linux 201404 with a wired connection. I am new to Arch, but been a long time Debian user, so the Arch ip toolset is not too familiar to me.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

I did this exact thing this morning.

First, double check that the lease isn't allocated. Go to the Status page and then the LAN page on DD-WRT. Check the lease in the list of DHCP clients. If it's allocated, click the trash can.

I also have my lease set to 5 minutes. If I left it for a whole day, which is the default, I found that if the signal got disrupted, my computer would disconnect and when it reconnected, the lease would still be allocated and so it would take an address from the pool. That messed with my port forwards. Setting it to 5 minutes prevented that.

Then, following from this part of the wiki, you need to find the name and MAC of your wireless NIC:

$ iw dev

Make sure you're using that MAC in your static lease on DD-WRT as the wired one will be different (I've made that mistake before).

Checking the status of your link is done via:

$ iw dev wlan0 link

It will either say Not Connected or give you information about your access point. At this point you don't want to be connected so if you are, issue:

# iw dev wlan0 disconnect

The wiki says that interface activation is not usually necessary, though for me it was. You can check the status with:

# ip link show wlan0

Don't pay attention to the state but look for the word UP inside the <...>.

If it's not up, use:

# ip link set wlan0 up

I'm going to assume that you know your SSID. In which case to connect to the access point, you can use:

# iw dev wlan0 connect your_essid

if it's open or:

# wpa_supplicant -i wlan0 -c /etc/wpa_supplicant.conf

if you're using WPA, after providing the appropriate details in wpa_supplicant.conf.

Now recheck that you're associated with the access point by reissuing:

$ iw dev wlan0 link

Finally, you'll want to obtain an IP address by issuing:

# dhcpcd wlan0

DD-WRT should then match the MAC of your wireless NIC and issue the static lease address to you.

share|improve this answer
    
Thank you! It turns out that the lease was already allocated from the previous instance of the machine before I rebuilt it with Arch. –  Jonas Gorauskas Apr 13 at 0:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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