码迷,mamicode.com
首页 > 系统相关 > 详细

Shell脚本——DHCP自动部署

时间:2015-04-21 22:08:24      阅读:277      评论:0      收藏:0      [点我收藏+]

标签:

详细说明参考:

(三)跟我一起玩Linux网络服务:DHCP服务配置之主服务器配置

 

 1 #! /bin/bash
 2 IPSAG="10.10.10"
 3 DNSIP="10.10.10.10"
 4 DN="ns.gr.org"
 5 cat  >  /etc/dhcpd.conf << +END+
 6 ddns-update-style interim;
 7 ignore client-updates;
 8 subnet $IPSAG.0 netmask 255.255.255.0 {
 9         option routers                  $DNSIP;
10         option subnet-mask              255.255.255.0;
11         option domain-name              "$DN";
12         option domain-name-servers      $DNSIP;
13         option time-offset              28800;
14         range dynamic-bootp $IPSAG.100 $IPSAG.200;
15         default-lease-time 21600;
16         max-lease-time 43200;
17         host boss {
18                 next-server marvin.redhat.com;
19                 hardware ethernet 12:34:56:78:AB:CD;
20                 fixed-address 207.175.42.188;
21         }
22 }
23 +END+
24 service dhcpd restart
25 ps -ax | grep dhcpd

 

Shell脚本——DHCP自动部署

标签:

原文地址:http://www.cnblogs.com/miao-zp/p/4445534.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!