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.

I have a router/modem at ip 192.168.1.254. I also have a linksys router connected to the modem through the LAN port.

So right now I have this:

192.168.1.254 <----> 192.168.1.1 <----> PCs (192.168.1.2,etc)

The problem is, I have to assign a fixed ip to my PCs (others work in dhcp, I dont know exactly how), and I also have to configure the gateway and dns server (the modem/router: 192.165.1.254) on each PC.

Can I set up my router to achieve the following:

  • Use only dhcp
  • No need to configure gateway on PCs
  • No need to configure dns server on PCs

?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

In general: you should be able to configure your DHCP server to assign permanent leases based on MAC address to certain clients. I have DD-WRT set up on my WRT54G router to do just this - so certain machines on my network will always have the same IP. Hunt around for the options in your router's firmware, see if they're there :-)

DHCP will also handle DNS and gateway configuration - so you should just be able to enter these values on your DHCP server (you didn't specify which of your routers is handling it) and clients will pick it up automatically. Indeed, that's the primary function of DHCP!

share|improve this answer
    
"also have to configure the gateway and dns server (the modem/router: 192.165.1.254) on each PC.". The router/modem is being used as gateway and dns server. –  Miguel Ping Oct 27 '09 at 12:22
    
Besides, I don't need to have a permanent dhcp lease. I just don't want to configure gateway/dns for each pc. –  Miguel Ping Oct 27 '09 at 12:23
    
You also said you needed some of your machines to have a fixed IP address. You have two choices: manually configure those machines (IP address, DNS, gateway), which you've said you don't want to do; or set up the DHCP server to always give those machines the same IP address (eg a permanent lease) plus DNS and gateway. –  James Muscat Oct 28 '09 at 10:36
    
Solved. My router's dhcp was conflicting with my modem/router's dhcp. I disabled one of them. –  Miguel Ping Nov 3 '09 at 16:19

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.