Professional Documents
Culture Documents
If not installed, then installed the packages using Yum command:
[root@dhcp ~]# Yum Install dhcp* lib*
(Original File):
#Broadcom Corporation Net link BCM57875 Gigabyte Ethernet PCI
Express
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:0C:29: EB: B2: CA
ONBOOT=yes
(Modified File):
#Broadcom Corporation Net link BCM57875 Gigabyte Ethernet PCI
Express
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:0C:29: EB: B2: CA
ONBOOT=yes
TYPE=Ethernet
PEERDNS=no
USERCTL=no
IPV6INIT=no
IPADDR=192.168.1.10
NETMASK=255.255.255.0
NETWORK=192.168.1.0
BROADCAST=192.168.1.255
Step-3: After complete the NIC configure you have to change the host name by following
this command:
[root@dhcp ~]# vi /etc/sysconfig/network
(Original File):
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain
(Modified File):
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=SRV OU DHCP
search tmsir.ma
nameserver 192.168.1.10
nameserver 192.168.1.20
Step-4: Copy & Rename the DHCP configuration file & Change the permission by
following this command:
[root@dhcp ~]# cd /usr/share/doc/dhcp-3.0.5/
[root@dhcp dhcp-3.0.5]# cp dhcpd.conf.sample /etc/dhcpd.conf
[root@dhcp dhcp-3.0.5]# chmod 777 /etc/dhcpd.conf
Now Edit this file using vi editor & make some change in to this file.
[root@dhcp ~]# gedit /etc/dhcpd.conf
(Original File):
ddns-update-style interim;
ignore client-updates;
ddns-update-style interim;
ignore client-updates;
subnet 192.168.1.0 netmask 255.255.255.0 {
}
Esc → Shift + : → x! → Enter
Step-5: Create a dhcp.leases file that the DHCP server grants to the DHCP client to use a
particular IP address. If it does not exist dhcp server will fail to provide IP address for dhcp
cient.
[root@dhcp ~]# touch /var/lib/dhcpd/dhcpd.leases
[root@dhcp ~]# service network restart
[root@dhcp ~]# service dhcpd restart
Linux Client
[root@dhcp ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
#Broadcom Corporation Net link BCM57875 Gigabyte Ethernet PCI
Express
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:0C:29: EB: B2: CA
ONBOOT=yes
TYPE=Ethernet
Windows Client
From NIC Properties =>> set Obtain an IP Address Automatically
Step-7: Renewing IP Address
The -r flag explicitly releases the current lease, and once the lease has been released, the
client exits. For example, open terminal and type the command:
[root@dhcp ~]# dhclient –r
Now obtain fresh IP:
[root@client1 ~]# dhclient
Or you can put the two commands on a single line: