Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I enter ifconfig command, I get inet address as for example.

But sometimes this address changes to something like like when linux is restarted or when the router is restarted or sometimes it changes even by itself.

This causes a lot of work for me to change again configurations in my projects that needs this IP address.

I am using Fedora 13 64bit.

My DSL Model/Router box is connected to this linux box in addition to other boxes in the local area network. This in unbranded modem/router reachable via I am not sure if this has anything to do with the issue in this question.

share|improve this question
You need to configure both your router and PC for static IP addresses. There should be an option on your router. I'm not a Linux expert and you don't give your router make/model. However, unless your projects are strictly personal you'll have to make sure that they can cope with running on other machines where the IP address will be different. You should really look into modifying them so that they can auto-detect the IP address if possible. – ChrisF Jun 6 '11 at 9:16
up vote 3 down vote accepted

DHCP Reservation

Set a reservation in your DHCP server (your router) based on the MAC address (Ethernet address) of the Linux computer's main Ethernet interface.

You can find your Linux PC's MAC address by opening a command shell and typing /sbin/ifconfig -a and looking for HWAddr 00:af:fa:56:ef:fe

Since your DSL-router is unbranded and unidentified we cannot tell you how to do this, you might navigate to it's configuration screen and takes some screen shots to post here (edit your answer and add them to the end).

Static IP address

Alternatively, configure a static IP-address on the Linux computer and ensure the router's configuration excludes that address from it's DHCP pool.

This also requires some configuration work on your unidentified router (see above).

On Fedora, the easiest way to set a static IP address is to use the network configuration tools. I would open a shell session and use sudo system-config-network.


Using a static address requires that you understand how to configure a default route, and probably the DNS resolver etc. I suggest it will be much easier for you to configure a DHCP reservation in your router (if it supports it).

share|improve this answer
I am new to Linux. Thanks for your answer but I am completely at a loss how to make use of your answer to solve my problem. I would like instructions like what commands to run etc. – Mark Jun 6 '11 at 9:37
I'll update the answer. – RedGrittyBrick Jun 6 '11 at 9:58

Your Answer


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.