LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Building LAN using DHCP (http://www.linuxquestions.org/questions/linux-networking-3/building-lan-using-dhcp-822576/)

Mr. Alex 07-28-2010 03:14 AM

Building LAN using DHCP
 
Do I undersatnd correct?
If you build LAN with several Linux PCs and no DHCP server, you will need to configure every computer yourself. But if you add one more PC to this LAN which is DHCP server, all you need is to configure this DHCP server and write in config files of other computers to use DHCP, network will work without configuring other computers? Right?

jschiwal 07-28-2010 03:28 AM

You will need to configure your hosts to use DHCP. At home, I use the DHCP server on my router, but have manually mapped the IP/MAC address in the router so that each computer gets the same IP address each time. This allows me a use an /etc/hosts file. With only a few hosts, this allows me to use the /etc/hosts file for LAN name resolution instead of using DNS, dnsmasq or Avahi.

Mr. Alex 07-28-2010 07:20 AM

Quote:

You will need to configure your hosts to use DHCP.
In "/etc/network/interfaces"?

jschiwal 07-28-2010 09:23 AM

I don't use Ubuntu. Either there, or /etc/sysconfig/networking/ifcfg-eth0. Ubuntu should have a graphical configuration wizard to configure the network. That would be the easiest way of doing it.

Mr. Alex 07-28-2010 10:16 AM

I don't trust GUI "wizard"... :)

sem007 07-28-2010 10:20 AM

Quote:

Do I undersatnd correct?
If you build LAN with several Linux PCs and no DHCP server, you will need to configure every computer yourself. But if you add one more PC to this LAN which is DHCP server, all you need is to configure this DHCP server and write in config files of other computers to use DHCP, network will work without configuring other computers? Right?
Yes you are right. If you are using DHCP server in network then it will serve network configuration(ip,netmask,dns etc..) to other computer.

Quote:

Quote:
You will need to configure your hosts to use DHCP.

In "/etc/network/interfaces"?
yes in ubuntu/debian this is a network configuration file
you need to tell computer use DHCP server to receive ip.

Code:

autho eth0 lo
iface eth0 inet dhcp

HTH

Mr. Alex 07-28-2010 10:43 AM

Thanks!


All times are GMT -5. The time now is 04:21 PM.