Can you get a static ip address from dhcp?

AmigaMan

Diamond Member
Oct 12, 1999
3,644
1
0
It seems that my laptop at work always gets a different IP address from DNS almost everyday now. I know dhcp means dynamic host configuration protocol and that it's supposed to give you a different ip address, but I'd like to know if there is a way to not have that happen. Can't you configure the dhcp server to always send out the same ip to a given mac address?

The reason I ask is I have several configuration files that have ip addresses hardcoded in them and I have to change them each time my ip changes. I'm getting tired of it....any suggestions?
 

TGS

Golden Member
May 3, 2005
1,849
0
0
You may end up with conflicts if you use a static IP in a dynamic range.

Why would you hardcode IPs in a configuration file? Can't edit the host file or DNS?
 

Variable D

Junior Member
Jun 28, 2005
13
0
0

Sure, this is done all the time if your putting up a box that needs a static address. You can add an Address Reservation by the Laptops MAC address. This way the laptop's NIC will have a specific IP reserved.
 

networkman

Lifer
Apr 23, 2000
10,436
1
0
What I did at home for my network was to have the DHCP server issues IPs from 192.168.1.5 thru .50 and set my own 5 server machines with static addresses starting at .50 and working backward, so .49, .48, etc.

That way any machine being added to the network, like friends dropping over for a LAN party are going to be assigned IPs at the beginning of the range, so no conflict. Long before I could ever worry about IP conflicts, I'd be tripping breakers(since I'm not doing any wireless). ;)
 

AmigaMan

Diamond Member
Oct 12, 1999
3,644
1
0
ok, I'm an idiot...this is what LOCALHOST is for. duh.
I just set my config files to use localhost and it's working...
 

Scarpozzi

Lifer
Jun 13, 2000
26,391
1,780
126
Originally posted by: PawNtheSandman
You can set up your DHCP server to reserve certain IP's for certain MAC addresses.
That's correct. It takes Admin access to do this though...