Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Linksys WRT54G/GL/GS that I am running DD-WRT v24-sp2 (10/10/09) vpn - build 13064 on it and for the life of me I can not find a way to assign ip's based on Mac address. Basically I have a few laptops and Windows really has no decent way to have separate profiles for each network.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Assigning IP addresses based on MAC addresses is generally done by the DHCP server; this is often referred to as "static leases".

Here's the DD-WRT tutorial on enabling Static DHCP. In the web administration GUI, you'll find this option on the Services tab, in the DHCP Server options.

If you're using the ssh commandline interface, use the following commands:

  • builds earlier than 13832:

    # X is the total number of static leases
    nvram set static_leasenum=X
    
    # note the space between the two example addresses
    nvram set static_leases="00:11:22:33:44:55=name1=IP-Address1 00:11:22:33:44:56=name2=IP-Address2"
    
  • build 13832 and later:

    # X is the total number of static leases
    nvram set static_leasenum=X
    
    # note the space between the two example addresses
    # the last field is new; lease time; leave empty for "indefinite"
    nvram set static_leases="00:11:22:33:44:55=name1=IP-Address1= 00:11:22:33:44:56=name2=IP-Address2=1440"
    

alt text

share|improve this answer
    
the procedure may differ if you've replaced the default DHCP server with DNSmasq; see dd-wrt.com/wiki/index.php?title=DNSMasq_as_DHCP_server –  quack quixote May 1 '10 at 23:19
    
Perfect thanks. Was hoping for a web based way but this works perfectly as well. –  MrStatic May 2 '10 at 0:51
1  
MrStatic: There is a web based way. To quote quack quixote - In the web administration GUI, you'll find this option on the Services tab, in the DHCP Server options. –  Piotr Dobrogost May 16 '10 at 11:11
2  
@Piotr Dobrogost: The web based way is broken for a lot of people, including me. I'm on DD-WRT v24-sp2 (06/14/11) and the web interface for adding static leases just plain doesn't work. It gives no errors. It just does nothing. Searching shows that a lot of people have this issue. –  MountainX Feb 29 '12 at 2:23
    
BTW, don't define extra leases or none of them will be saved. X must be the exact number defined in following statement. –  MountainX Feb 29 '12 at 4:17

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.