Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there an easy to set Linux (Ubuntu 10.4) to always use the same IP address from my router? I know in windows you can tell it to use a static IP address in the TCP/IP settings, what's the same for Linux?

I need it to always have an IP address of 192.168.111.133

share|improve this question
2  
There's a big difference between setting a static address and a DHCP reservation. Which are you really after? –  John Gardeniers Jan 4 '11 at 0:36
1  
Probably a duplicate of serverfault.com/questions/113866/… –  TheLQ Jan 4 '11 at 1:11

1 Answer 1

To set your machine up with a static IP address, edit /etc/network/interfaces

Add lines like:

auto eth0
iface eth0 inet static
        address 192.168.111.133
        netmask 255.255.255.0
        gateway 192.168.111.1

This assumes your router is on 192.168.111.1.

If you really want a DHCP reservation, that needs to be done from your DHCP server (probably your router).

share|improve this answer

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.