Brian Thomas
asked on
Force DHCP address assignment
I have a Linksys WRT54G wireless Router. I have this as my interface to my CableModem, so I can share this connection amongst several computers, some wireless, some not. I also use the Port Forwarding function, so that specific port requests can be forwarded to a specific computer on the router for processing by specific server software. The problem is that occasionally, the specific computer on the network will need to be re-booted, and when it does, it does not always get the same IP address. I would like it to receive 192.168.1.100. But occasionally it will get the 102 or 101 address. And then the port forwarding is all messed up. I have tried setting up the NIC on this computer to use fixed IP instead of DCHP, but since the router is a DCHP router, this doesn't work. How can I force the router to always give this computer the same IP address?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
To PsiCop: By DHCP Router, I mean the Linksys router. It assigns IP addresses to the computers that try to connect to it. But it ASSIGNS addresses, it doesn't process requests for specific addresses.
To lrmoore: Thanks, I will give that a shot, and see if the router knows how to handle computers which think they already have an address.
To lrmoore: Thanks, I will give that a shot, and see if the router knows how to handle computers which think they already have an address.
if you want a computer to have a specific address at all times through your linksys wireless router, then just assign a static ip address to it. do ipconfig /all
copy down all the info there, then just paste it in your network properties tcp/ip configurations. easiest way to me if i would do this.
copy down all the info there, then just paste it in your network properties tcp/ip configurations. easiest way to me if i would do this.
ASKER
To Pentrix2:
As I mentioned in the original problem statement, I have tried this, and it fails. The router does not assign this (or ANY) address to the computer when I configure a fixed IP address for the NIC.
As I mentioned in the original problem statement, I have tried this, and it fails. The router does not assign this (or ANY) address to the computer when I configure a fixed IP address for the NIC.
when you assign the ip, of course the router doesn't assign it. but as long as you got the default gateway in there, it should work. what OS are you using, xp professional or 2000? and what error message is it giving you when you assign a fixed ip, is it letting you and your port forwarding not working? are you able to pull up the router's configuration up with the fixed ip in place?
Hmmm...I wonder if the router will refuse to route IP traffic from an address to which it has not leased an IP address? I mean, its specifically designed to do that. I don't see the point of such a limitation, tho.
ASKER
I think lrmoore may be onto something, selecting an address outside the lease range, but won't know if linksys will allow routing outside that range until I try it. Which I will do when I get home tonight.
There are two ways to do this:
1. Assign a static address within the subnet, but outside the DHCP scope. lrmoore has suggested this already, and he is correct.
2. Assign a "reservation" in the DHCP service, so that this machine's MAC address will always be assigned the specified address. This is a better choice, for several reasons:
a. You can leave the client configured to get configuration from DHCP. Odds are that this will continue to work if/when you move the machine to another network.
b. All of the parameters that DHCP sets -- mask, gateway, DNS, etc -- remain controlled from a single place, so if you need to change any of them, you only need to do it there.
Now if you don't do either 1 or 2, you run the risk that you will statically assign an address in the DHCP scope. The DHCP server won't know you've done that, so it will feel free to offer that address to another client. And at least one of the machines that now have this address will stop working.
Although they're routinely implemented in the same box, "router" and "DHCP server" are functionally orthogonal. The router function has no business tracking the DHCP lease database, and will be considered "broken" if it does so. The only useful connection I can see between them would be if the lease database were used to populate the ARP cache to reduce broadcast traffic, and although that should work, it might not be legal. And while it would slightly optimize service for DHCP clients, it wouldn't break service for non-clients.
1. Assign a static address within the subnet, but outside the DHCP scope. lrmoore has suggested this already, and he is correct.
2. Assign a "reservation" in the DHCP service, so that this machine's MAC address will always be assigned the specified address. This is a better choice, for several reasons:
a. You can leave the client configured to get configuration from DHCP. Odds are that this will continue to work if/when you move the machine to another network.
b. All of the parameters that DHCP sets -- mask, gateway, DNS, etc -- remain controlled from a single place, so if you need to change any of them, you only need to do it there.
Now if you don't do either 1 or 2, you run the risk that you will statically assign an address in the DHCP scope. The DHCP server won't know you've done that, so it will feel free to offer that address to another client. And at least one of the machines that now have this address will stop working.
Although they're routinely implemented in the same box, "router" and "DHCP server" are functionally orthogonal. The router function has no business tracking the DHCP lease database, and will be considered "broken" if it does so. The only useful connection I can see between them would be if the lease database were used to populate the ARP cache to reduce broadcast traffic, and although that should work, it might not be legal. And while it would slightly optimize service for DHCP clients, it wouldn't break service for non-clients.
ASKER
To PennGwyn:
I wish there were a way to "reserve" IP addresses in the Linksys DHCP setup, much like the port forwarding works. But as far as I can tell, there is not way to do this with this Linksys.
I wish there were a way to "reserve" IP addresses in the Linksys DHCP setup, much like the port forwarding works. But as far as I can tell, there is not way to do this with this Linksys.
beachbt,
that is true. While the dhcp features make this a nice little SOHO router that just works right out of the box, there are no advanced features like that to turn it into an enterprise-ready DHCP server.
I've been using Linksys for several years and I know for a fact that all you have to do is use a static IP address that is outside the scope of the DHCP server which starts at 100 and continues up to the maximum number that you have specified. Anything between .2 and .99 is fair game to use as static IP's..
that is true. While the dhcp features make this a nice little SOHO router that just works right out of the box, there are no advanced features like that to turn it into an enterprise-ready DHCP server.
I've been using Linksys for several years and I know for a fact that all you have to do is use a static IP address that is outside the scope of the DHCP server which starts at 100 and continues up to the maximum number that you have specified. Anything between .2 and .99 is fair game to use as static IP's..
ASKER
Setting Fixed IP to .99 and setting Gateway and DNS to 192.168.1.1 worked like a charm. Many thanks.
I don't understand what you mean by "DHCP router" and the router's desires having anything to do with you being able to force an IP address on the workstation. What happens when you do that?