Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I'm behind a router with at least 1 client and at most 3 clients. My "main" client runs some services like Apache2 so I port forwarded in router configuration the incoming traffic to its IP address assigned by the router's dhcp. Sometimes it happens that the routers assigns to my main client so i have to change all the forwarding. Are there any possibilities to avoid this?

I thought about something like

ifconfig eth1 down
ifconfig eth1 up

but this doesn't help. I still have

This doesn't work either.

dhclient -r
ifconfig eth1 down
ifconfig eth1 up

I have still after reconnecting.

Maybe there are another solutions? By the way, this must not be a perfect solution because it's just a home network, but the target is to not change all the forwardings all the time.

share|improve this question

migrated from Feb 20 '12 at 3:58

This question came from our site for system and network administrators.

up vote 4 down vote accepted

This is called a "DHCP reservation", or sometimes "static DHCP".

How it's configured will depend on your router, but many consumer routers do have this capability.

share|improve this answer
You were right, my router supports such an option. Works now, thanks. – Bevor Feb 19 '12 at 19:38

Shane's suggestion should work.

Another method - say if your router is and it starts giving out ip addresses from onwards, you may be able to reconfigure it so the first available ip to give out is i.e. Then you can manually specify the ip on devices - and it will work.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .