การติดตั้ง DHCP Server
DHCP มาจาก Dynamic Host Configuration Protocol สำหรับท่านใดที่มีปัญหาเรื่อง IP ชนกันนะครับ
เพราะการตั้ง IP แบบ Static แล้วล่ะก็ DHCP Server จะช่วยท่านได้ครับ
เพราะว่า DHCP Server จะทำหน้าที่ในการแจกเบอร์ IP โดยอัตโนมัติและไม่มีทางที่จะซ้ำกันอีกด้วยครับ
เอาล่ะไม่ต้องเสียเวลามากครับ มาลงมือติดตั้งกันเล๊ย
ก่อนอื่นต้องตรวจสอบ package ก่อนครับ
[root@station10 ~]# rpm -q dhcp
package dhcp is not installed
ถ้ายังไม่ได้ติดตั้งก็ติดตั้งได้เลยครับ
[root@station10 ~]# rpm -ivh
/mnt/nfs/CentOS/RPMS/dhcp-3.0.1-54.EL4.i386.rpm
warning: /mnt/nfs/CentOS/RPMS/dhcp-3.0.1-54.EL4.i386.rpm: V3
DSA signature: NOKEY, key ID 443e1821
Preparing...
########################################### [100%]
1:dhcp
########################################### [100%]
จากนั้นทำการแก้ไข fle dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 192.168.0.0 netmask 255.255.255.0 {
# --- default gateway
option routers
192.168.0.1;
option
subnet-mask
255.255.255.0;
option nis-domain
"domain.org";
option
domain-name
"domain.org";
option
domain-name-servers 192.168.1.1;
option
time-offset
-18000; # Eastern Standard Time
# option ntp-servers
192.168.1.1;
# option netbios-name-servers
192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't
change this unless
# -- you understand Netbios very well
# option netbios-node-type
2;
range dynamic-bootp
192.168.0.128 192.168.0.254;
default-lease-time
21600;
max-lease-time
43200;
# we want the nameserver
to appear at a fixed address
host ns {
next-server
marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
พอเสร็จแล้วก็สั่ง
[root@station10 ~]# service dhcpd start
[root@station10 ~]# chkconfig dhcpd on
จากนั้นก็มาลองใช้ Client ทดสอบดูครับว่าสามารถรับ IP Address ได้ไหม
ลองทำดูครับ |