Tuesday, August 23, 2011

How to enable DHCP in Ubuntu 11.04

For DHCP, you will need to first install DHCP3-SERVER.
Open terminal and write "sudo apt-get install dhcp3-server

Once its installed, you need to check in few things:-
If your system is having more than one NIC, then you need to specify which nic is to be used for the DHCP service.
For that, type "sudo vi /etc/default/isc-dhcp-server"

Now in this, goto the line 'INTERFACES="" ' and enter the name of ethernet you want to use for dhcp there..... like 'INTERFACES="eth0" '

Now if your network adapter is getting IP via some other DHCP server, then you need to specify the subnet mask. So for that you need to modify the dhcpd.conf file. For that type "sudo vi /etc/dhcp/dhcpd.conf"
In that add this line "subnet <ip address> netmask <netmask_value>{} " like "subnet 192.168.233.129 netmask 255.255.255.0 {}"

Now restart the dhcp server and you will have it running. Type "/etc/init.d/isc-dhcp-server restart"

Now your dhcp server is running. You need to provide range that can be allocated in the dhcpd.conf file.....

No comments:

Post a Comment