安装dhcp服务器
查詢DHCP服務(wù)包?? #rpm -qa |grep dhcp 裝????? rpm -ivh?? 包名稱? dhcp-3.0pll-23.i386.rpm 更新? rpm -Uvh? 包名稱?? dhcp-3.0pll-23.i386.rpm DHCPD 服務(wù)名?凡是服務(wù)名的名稱一般都是以D結(jié)尾? 主配置文件/etc/dhcpd.conf? 默認(rèn)是為空 cp 將/usr/share/doc/dhcp-3.0pll/dhcpd.conf?.sample 拷貝到/etc/dhcpd.conf 修改配置文件/etc/dhcpd.conf
subnet 192.168.0.0 netmask 255.255.255.0 {? 網(wǎng)絡(luò)范圍 # --- default gateway
??????? option routers????????????????? 192.168.0.1;??網(wǎng)關(guān)
??????? option subnet-mask????????????? 255.255.255.0;? 掩碼 option domain-name????????????? "dos.com";???? 域名
??????? option domain-name-servers????? 192.168.1.1; dns 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.255; 地址池
??????? 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;
??????? } vi /etc/sysconfig/dhcpd? 指定網(wǎng)卡 DHCPDARGS=eth0 創(chuàng)建客戶租期數(shù)據(jù)庫 touch? /var/lib/dhcp/dhcp.leases 重啟服務(wù)? service dhcpd restart start? 啟動 客戶端先自動獲取IP netconfig? 空格[*]?? OK 重啟??? service network restart dhclient 客戶端獲取地址
subnet 192.168.0.0 netmask 255.255.255.0 {? 網(wǎng)絡(luò)范圍 # --- default gateway
??????? option routers????????????????? 192.168.0.1;??網(wǎng)關(guān)
??????? option subnet-mask????????????? 255.255.255.0;? 掩碼 option domain-name????????????? "dos.com";???? 域名
??????? option domain-name-servers????? 192.168.1.1; dns 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.255; 地址池
??????? 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;
??????? } vi /etc/sysconfig/dhcpd? 指定網(wǎng)卡 DHCPDARGS=eth0 創(chuàng)建客戶租期數(shù)據(jù)庫 touch? /var/lib/dhcp/dhcp.leases 重啟服務(wù)? service dhcpd restart start? 啟動 客戶端先自動獲取IP netconfig? 空格[*]?? OK 重啟??? service network restart dhclient 客戶端獲取地址
轉(zhuǎn)載于:https://blog.51cto.com/my1024/35853
總結(jié)
- 上一篇: 什么是物流管理
- 下一篇: 华思视频 CCNA 听而思