简易linux dhcp设定
dn001
dncp的设定 查找dhcp是否安装 ank#rpm -qa |grep dhcp
/etc/dhcp.conf;;;;-->主要的设定档 /usr/sbin/dhcpd;;;-->dhcp的daemon的执行档 /var/lib/dhcp/dhcpd/leases-->租约的启动与到期就是记录在这个档案当中
设定dhcp.conf 1整体global 含有助于期限,或许还有dns与router的设定等 2动态ip的设定:使用subnet的项目与range的参数来设定要分配出去的ip 3静态ip的设定:使用host这个项目段,配合mac来设定
dhcp.conf
#globa #default -lease-time 259200 #option <参数代码><设定内容> for example :option domain-main "domian.name"
#设定租约期限 default-lease-time 295200 max-lease-time 518400
#2设定领域名称与dns ip option domain-name "ank.web.cn" option domain-name-serers 192.165.4.4 , 195.154.4.45
#2动态 subnet 192.168.1.0 netmask 255.255.255.0{ range 192.168.1.21 192.168.1.100 option broadcast-address 192.168.1.255 option routers 192.168.1.2 } #3静态 host ank-inside{ hardware ethernet 40:95:30:42:B4 fixed-address 192.168.1.5 option broadbast-address 192.168.1.255 option routers 192.168.1.2 }
| |
|
|
|