½ñÌìÏÂÎçÀûÓÃÒ»µãʱ¼äÔÚvmwareÖÐѧϰlinuxϵÄDHCPµÄÅäÖÃ
Ò» ÊÔÑéµÄÇ°ÆÚ»·¾³´î½¨
1 ϵͳ»·¾³£ºFedora 2
2 Èí¼þ°æ±¾£º ÔÚµÚ¶þÕŹâÅÌÖÐ dhcp-3.0.1rc12-4.i386.rpm
3 Ó²¼þ»·¾³
Ê×ÏÈ°ÑvmwareÖеÄÍø¿¨ÉèÖóÉhost-only
Ï൱ÓÚÔÚhostÉϵÄÐéÄâÍø¿¨vmnet1ÓëÐéÄâ»úµÄÍø¿¨Á¬½Ó£¬½ûÓÃvmnet1Íø¿¨µÄDHCP(ĬÈÏÇé¿öÏÂÊÇÆôÓõġ£
¶þ °²×°dhcp·þÎñÆ÷¶Ë
rpm -ivh dhcp-3.0.1rc12-4.i386.rpm
ÔÚ /usr/share/doc/dhcp-3.0.1rc12/dhcp.conf.sampleÖÐÓÐdhcpµÄÅäÖÃÎļþÄ£°å
°Ñdhcp.conf.sample Îļþ¿½±´µ½/etcĿ¼Ï²¢¸ü¸ÄÎļþÃûΪdhcpd.conf
ÔÚ/etc/dhcpd.conf ÖнøÐÐdhcpµÄÅäÖù¤×÷
³£ÓÃÅäÖÃÈçÏ£º
//ÉèÖÃ×ÓÍøÉùÃ÷
subnet 192.168.2.1 netmask 255.255.255.0£û
//ΪDHCPÉèÖÃĬÈÏÍø¹Ø
option routers 192.168.2.1
//ΪDHCPÉèÖÃ×ÓÍøÑÚÂë
option subnet-mask 255.255.255.0
//ΪDHCPÉèÖÃDNS·þÎñÆ÷µØÖ·
option domain-name-servers 192.168.2.1
//ÉèÖõØÖ·³Ø
range dynamic-bootp 192.168.2.100 192.169.2.254
//Ö¸¶¨DHCP¿Í»§µÄMACµØÖ·
host ns£û
hardware ethernet **:**:**:**:**:**
//¶ÔÖ¸¶¨µÄMACµØÖ··ÖÅä¹Ì¶¨µÄIPµØÖ·
fixed-address 192.168.2.111 £ý
ÁíÍâÔÚ/var/lib/dhcp/dhcpd/lease ÖпÉÒԲ鿴·ÖÅä³öÈ¥µÄIP
¼òµ¥µÄDHCP·þÎñÆ÷¾Í´î½¨Íê³ÉÁË£¬Í¨¹ý²âÊÔ»ú²âÊÔ¿ÉÒÔ»ñÈ¡IPµØÖ·
ÒòΪ»¹Óл¹Óкܶà¸ß¼¶¸´ÔÓµÄÅäÖýñÌìûÓÐʱ¼äÊÔÑ飬ÒÔºóÓÐʱ¼ä»á¼ÌÐøÍêÉÆÕâ¸öÅäÖÃÎĵµ¡£