contos 安装sublime6.5下dhcp安装与配置,要截图的

CENTOS5.5下DHCP安装配置并发测试及地址分配验证
CENTOS5.5下DHCP安装配置并发测试及地址分配验证
[摘要:1、情况 Centos5.5 32 位。 2、装置硬件包 dhclient-3.0.5-18.el5 dhcp-3.0.5-18.el5 dhcp-devel-3.0.5-18.el5 3、举行主文件设置装备摆设: 1)上面设置装备摆设的dhcp是A类网址,末端是某个天市的全部机顶盒。 2)本机]
一、环境Centos5.5 32位。二、安装软件包dhclient-3.0.5-18.el5dhcp-3.0.5-18.el5dhcp-devel-3.0.5-18.el5三、进行主文件配置:1)下面配置的dhcp是A类网址,终端是某个地市的所有机顶盒。2)本机配置了dns,地址为:10.1.0.17。如果没有配的话,dhcp配置文件中可删除。3)由于是用来给机顶盒分配ip地址,因此配置了option60。 & 如果是终端是电脑的话,则可以删除相关选项。比如最后一步的测试,我们需要拿笔记本来测试,因此删除:class &STB& 以及option vendor-class-identifier和allow members of &STB&选项,以便允许给笔记本分配ip地址。 & &以下是配置文件:vi /etc/dhcpd.conf########################################## DHCP Server Configuration file.# &see /usr/share/doc/dhcp*/dhcpd.conf.sample### DHCP Server Configuration file.# &see /usr/share/doc/dhcp*/dhcpd.conf.sample#ddns-update-ignore client-option domain-name-servers 10.1.0.17;default-lease-time & 25600;max-lease-time & & & 86400;class &STB& { & match if substring (option vendor-class-identifier, 0, 14) =&DTV-CHINA&;} & subnet 10.140.128.0 netmask 255.255.224.0 { & & & pool { & & & & & range 10.140.128.6 10.140.159.250; & & & & & option routers & & & & & & & & 10.140.128.1; & & & & & option subnet-mask & & & & & & 255.255.224.0; & & & & & option vendor-class-identifier &DTV-CHINA&; & & & & & allow members of &STB&; & & & } & &} & subnet 10.140.160.0 netmask 255.255.224.0 { & & & pool { & & & & & range 10.140.160.6 10.140.191.250; & & & & & option routers & & & & & & & & 10.140.160.1; & & & & & option subnet-mask & & & & & & 255.255.224.0; & & & & & option vendor-class-identifier &DTV-CHINA&; & & & & & &allow members of &STB&; & & & } & &} & #下面还有很多的subnet子网就不列举了。 & subnet 10.140.192.0 netmask 255.255.224.0 { & & & pool { & & & & & & & ... ...
& & & } & &}四、将eth1设置为自动获取ip地址:vi/etc/sysconfig/network-scripts/ifcfg-eth1######################################### Intel Corporation 82574L Gigabit NetworkConnectionDEVICE=eth1BOOTPROTO=dhcpHWADDR=C8:60:00:EA:45:7CONBOOT=yesTYPE=EthernetUSERCTL=noIPV6INIT=noPEERDNS=yes########################################五、增加本机各个网段地址 & &如果需要实现以下的配置,则需要在交换机中配置vlan,与之对应。 & &如果是做最后一步测试的话,则可以简单化。比如我们要压力测试下10.140.128网段的,则在以上配置文件中仅留下subnet 10.140.128.0这一项,并且服务器网卡可以配置为10.140.128.5 进行测试。 & &另外,最后一行为在本脚本中启动dhcpd服务的命令,而不要将服务配置为自动启动。原因是服务器启动时,centos中的服务是优先于下面的脚本先启动。如果脚本上的那些ip没有配置上的话,dhcpd启动会失败。vi/etc/rc.d/rc.local########################################!/bin/sh## This scriptwill be executed *after* all the other init scripts.# You can putyour own initialization stuff in here if you don't# want to do thefull Sys V style init stuff.touch/var/lock/subsys/localvconfig add eth1301vconfig add eth1311ifconfig eth10.0.0.0 upifconfig eth1.301 10.1.0.17 netmask 255.255.255.0 up & & & & & &#dns安装在本机ifconfig eth1.311 10.140.128.5 netmask 255.255.224.0 upifconfig eth1.312 10.140.160.5 netmask 255.255.224.0 uproute add -net0.0.0.0 netmask 0.0.0.0 gw 10.1.0.254/etc/init.d/dhcpd start在启动服务前,可以将删除/var/lib/dhcpd/dhcpd.leases*,以便能够准确的查看dhcpd.leases文件的变化。六、删除arp有时候,地址分配会出现一些问题,可以使用删除arp的命令来清空缓存:1,删除某一个ip地址缓存: & &arp -d 10.140.128.2542,删除某一段ip地址缓存; & &for ((i=1;i&=255;i++));do arp -d 10.140.128.&$i& &&/dev/done3,删除所有的ip地址缓存:ip n f dev eth1 或 ip neigh flush dev eth1七、子网简单算法255.255.224.0 转换成二进制为 11 00. 即19/0(19个1)前面的1表示的是子网,后面的0表示的是每个子网可带的ip地址。ip地址个数大概为:2的5次方×255 = 32×255。因此dhcp中的range,每一段都是32×255-1个ip地址range 10.140.128.1 10.140.159.255;range 10.140.160.1 10.140.191.255;range 10.140.192.1 10.140.223.255;range 10.140.224.1 10.140.255.255;而如果地址不够用的话,则可以将上面的地址池进行扩大,可以将子网改成18/0,即:0 00,即255.255.192.0。此时,range每一段为64×255-1个ip地址:range 10.140.128.110.140.191.255;range 10.140.192.110.140.255.255;如果配置要扩大的话,可能还需要修改核心交换机的配置。另外,A类地址的0和255居然也能被分配到,比如子网是255.255.224.0,可以在笔记本上配置 10.140.129.0或者是10.140.129.255,居然也能ping通dhcp服务器。这应该是跟c类地址不一样的地方吧。八、测试参考资料:/support/measurement-tools//p-.html/view/f5acfa1c7cd32.html由于dhcpd服务器配置了option60,只能给机顶盒分配ip地址。因此,我们不能直接进行测试。为了测试方便,我们对配置文件进行了修改(以下红色表示dhcp服务器,蓝色表示测试客户端),将服务器的ip地址改成 10.140.128.5 :[root@adp-ds ~]# more /etc/dhcpd.conf## DHCP Server Configuration file.# & see/usr/share/doc/dhcp*/dhcpd.conf.sample &#ddns-update-ignore client-option domain-name-servers 10.1.0.17;default-lease-time & & 25600;max-lease-time & & & 86400;subnet 10.140.128.0 netmask 255.255.224.0 { & & & &pool{ & & & & & & & range 10.140.128.6 10.140.156.250; & & & & & & & option routers & & & & & & & & 10.140.128.1; & & & & & & & option subnet-mask & & & & & & 255.255.224.0; & & & &}}重启下dhcpd:# service dhcpd restart准备一台测试机器,操作系统可以是centos5.5 32bit。将测试机与dhcpd服务器通过网线连接起来,并确认能够进行通讯,这里我们将测试机器连接到dhcpd服务器的10.140.128网段,测试客户端的ip地址设置为10.140.128.4。下载dhcperf-1.0.1.0-1-rhel-4-i386.tar,解压出dhcperf-1.0.1.0-1.i386.rpm进行安装:#tar -zxvf dhcperf-1.0.1.0-1-rhel-4-i386.tarcd dhcperf-1.0.1.0-1-rhel-4-i386rpm -ivh dhcperf-1.0.1.0-1-rhel-4-i386.rpmcd/usr/local/nom/bin/./dhcperf --help在dhcpd服务器再开启3个tty,用来监测两个文件(地址分配文件、系统日志文件)和系统资源使用情况:# tail -f /var/lib/dhcpd/dhcpd.leases# tail -f /var/log/message# top开始测试(第一条命令是只获取一个ip地址,看看是否可以获取到):# ./dhcperf --server 10.140.128.5 --one-discoverSending DHCPDISCOVER.Received DHCPOFFER of 10.140.155.255.Sending DHCPREQUEST for 10.140.155.255.Received DHCPACK of 10.140.155.255.Acquired address: 10.140.155.255一个ip地址获取ip地址正常,继续测试:./dhcperf --server 10.140.128.5 --discover --clients 2此时,ip地址获取也正常,但过一段时间后,dhcpd服务器上系统日志有大量的错误信息:Sep &6 10:27:13 adp-ds kernel: Neighbour tableoverflow.Sep &6 10:27:13 adp-ds kernel: printk: 364messages suppressed.到google上搜索“dhcpd Neighbour table”,有个资料 /2011/02/neighbour-table-overflow-sysctl-conf-tunning/中说的比较详细。对系统参数进行修改:#vi /etc/sysctl.confnet.ipv4.neigh.default.gc_thresh1= 4096net.ipv4.neigh.default.gc_thresh2 = 8192net.ipv4.neigh.default.gc_thresh3 = 8192net.ipv4.neigh.default.base_reachable_time = 86400net.ipv4.neigh.default.gc_stale_time = 86400#sysctl -p重新启动dhcpd后再次在测试客户端执行:./dhcperf --server 10.140.128.5 --discover --clients 2就不再出现上面的问题了。执行完毕后,使用perl的脚本对/var/lib/dhcpd/dhcpd.leases 进行排序。即根据分配的地址进行排序处理,然后查看排序后的文件的ip地址分配情况。我将perl安装到我工作笔记的D:/Perl64/下,将/var/lib/dhcpd/dhcpd.leases拷贝到D:/Perl64/。然后执行下面的perl脚本。如果是在其他的目录,或者是linux环境下,可以修改下这个脚本的4个文件的路径即可,以下共享下perl脚本,写的不好,请多多指教:#! /usr/bin/perluse 5.010;use Data::Dif(open(MYFILE,&D:/Perl64/dhcpd.leases&)==0){die (&Can't open the file! n&);}my $my $my %######################################################################################### 本 while 循环从原始文件中读取数据,存入到hash结构中。对ip地址进行了处理,处理后的### 格式为xxx.xxx.xxx.xxx,以方便字符排序。### hash 结构的 key 为 ip 地址(最后面还有个回车符);value的格式为:### & &starts 5
03:18:52;### & &ends 5
10:25:32;### & &### & &nex### & &hardware ethernet 00:00:00:00:00:01;### & &uid &dhcperf_1&;### &}######################################################################################while(&MYFILE&){ &if (/^lease /) { & &$key = $_; & &$value = &} &else { & &$value = $value.$_; &} &if (/^}/) { & &### 对key进行处理将“lease 10.140.128.10 {”格式化成“010.140.128.010” ### & &$key =~ s/lease //; & & & & & & & & & & & & & & & & & & &# 去掉“lease” & &$key =~ s/ {//; & & & & & & & & & & & & & & & & & & & & &# 去掉“ {” & &### 格式化成 &xxx.xxx.xxx.xxx & &$key=~/^(d{1,3}).(d{1,3}).(d{1,3}).(d{1,3})$/; & &$key =sprintf(&%03d&,$1).&.&.sprintf(&%03d&,$2).&.& & & & & &.sprintf(&%03d&,$3).&.&.sprintf(&%03d&,$4).&n&; & & &#################### & &### 存入到hash结构中; & &$content{$key} = $ &}}close(MYFILE);############################################################################################################################################################################### 将排序后的信息先写入两个文件,并将ip地址存入另外一个hash表。### 第一个文件dhcpd2.leases 为排序后的带有原始mac地址等的信息;### 第二个文件dhcpd3.leases 为排序后的纯IP地址信息;每个ip地址为一行,从小到大排序### 而另外存入的hash表%ipdata的信息,其key为ip地址的网段,如010.140.129;### & 而value为ip地址的数组,从最小到最大排序,如 010.140.129.000一直到010.140.129.255######################################################################################if(open(WriteFILE1,& & D:/Perl64/dhcpd2.leases&)==0) { &die (&Can't open the file! n&);}if(open(WriteFILE2,& & D:/Perl64/dhcpd3.leases&)==0) { &die (&Can't open the file! n&);}my %my$ipkey=&&;my @ipvalue = ();foreach $key(sortkeys %content) { &print WriteFILE1&$key$content{$key}&; &print WriteFILE2 &$key&; &#可以将这些ip地址存储到一个二维数组(8×256)中,然后写入文件比较好阅读 &if (($ipkey ne substr $key, 0, 11) &&(scalar @ipvalue != 0)) &{ & &#say Dumper @ & &$ipdata{$ipkey} = [@ipvalue]; & &@ipvalue = (); &} &$ipkey = substr $key, 0, 11; &$ipvalue[(substr $key, 12, 3)] = substr $key,0, 15; &#say $ipvalue[$i];}$ipdata{$ipkey} =[@ipvalue];close(WriteFILE1);close(WriteFILE2);############################################################################################################################################################################### &将 %ipdata 这个hash表的key排序后存入到数组 @networksection######################################################################################my @networksection =();foreach $key(sortkeys %ipdata) { &push @networksection, $ }#say Dumper@############################################################################################################################################################################### 开始写二维数组文件,以便更好的阅读### 该文件共 8 列,每 256 行为一个块,然后空一行,再继续256行。每一列第一行有头部,表示某个### 子网。类似于:###-------------------------------------------------------### 010.140.128. & &010.140.129. & & & & & &010.140.135.###-------------------------------------------------------### 010.140.128..129.000 ... ... 010.140.135.000### 010.140.128..129.001 ... ... 010.140.135.001### &... ... ... ...### 010.140.128..129.255 ... ... 010.140.135.255### (空一行)###-------------------------------------------------------### 010.140.136. & &010.140.137. & & & & & &010.140.143.###-------------------------------------------------------### 010.140.136..137.000 ... ... 010.140.143.000### &... ... ... ...### &... ... ... ...### 010.140.136..137.255 ... ... 010.140.143.255### (空一行)### &... ... ... ...### &... ... ... ...###### 如果IP地址不存在,则以空格代替。这样,看起来就方便多了######################################################################################my $step =8; & & & & & & & & & & & & & & & & &# 即 8 列if(open(WriteFILE3,& & D:/Perl64/dhcpd4.leases&)==0){ &die (&Can't open the file! n&);}for (my $j=0;$j&@networksection/$ $j++){ &## 一行满 8 列的处理(有可能最后一个块不满 8列,则在 else 中进行处理) &if (@networksection &= ($j+1) * $step) &{ & &for (my $x=-3; $x&256; $x++) & &{ & & &my $string = &&; & & &#$string = $j. & &&; & & &for (my $k=0; $k&$ $k++) & & &{ & & & &my $temp = &&; & & & &if ($x & -1) { & & & & &$temp =${$ipdata{$networksection[$j*$step+$k]}}[$x] ; & & & &} & & & &elsif (($x == -3) || ($x == -1)) { & & & & &$temp = &---------------&; & & & & & & & & &} & & & &elsif ($x == -2){ & & & & &$temp = $networksection[$j*$step+$k]; & & & & &$temp = $temp . &. & &; & & & &} & & & &if (! defined &$temp) & & & &{ & & & & &# 如果ip地址不存在,则使用相同长度的空格代替 & & & & &$temp=& & & & & & & & &; & & & &} & & & &$string = $string . $temp . & &&
& & &} & & &$string =~ s/ +$//; & & & & & & & & & & & & & # 截掉最后的空格 & & &#say $ & & &print WriteFILE3 &$stringn&; & &} & &#say &&; & &print WriteFILE3 &n&; &} &else &# 最后一块不满 8列情况的处理 &{ & &for (my $x=-3; $x&256; $x++) & &{ & & &my $string = &&; & & &#$string = $j. & &&; & & &for (my $k=0; $k&(@networksection - $j* $step); $k++) & & &{ & & & &my $temp = &&; & & & &if ($x & -1) { & & & & &$temp = ${$ipdata{$networksection[$j*$step+$k]}}[$x]; & & & &} & & & &elsif (($x == -3) || ($x == -1)) { & & & & &$temp = &---------------&; & & & & & & & & &} & & & &elsif ($x == -2){ & & & & &$temp = $networksection[$j*$step+$k]; & & & & &$temp = $temp . &. & &; & & & &} & & & &if (! defined &$temp) & & & &{ & & & & &$temp=& & & & & & & & &; & & & &} & & & &$string = $string . $temp . & &&
& & &} & & &$string=~s/ +$//; & & &#say $ & & &print WriteFILE3 &$stringn&; & &} &}}close(WriteFILE3);九、后记 & &使用以上perl脚本,对正式系统上的的dhcpd.leases进行处理效果很显著,对已经分配的ip地址查看非常方便。不过由于正式系统正在运营,因此,不好进行压力测试。 & &不过发现一个奇怪的现象,正式系统中,centos5.5下的dhcp服务,分配出去的ip地址是从最后开始分配的。而且呈现三角的形状。如,10.140.128.6 10.140.156.250 网段,分配出去的地址为:10.140.132 &254 25510.140.133 &252 253 254 25510.140.134 &250 251 252 253 254 25510.140.135 &248 249 250 251 252 253 254 255... &...10.140.158 &203 &.... & & & & & & & & & & & & & & & & & & & & & &25510.140.159 &201 .... & & & & & & & & & & & & & & & & & & & & & & 255 & &搞不清楚系统为何怎么分配。按照这个规律,从132到159共有28层,第一层为2个ip地址,理论上共有ip地址为(1+28)×28=812个,如果是这样的话,生产环境ip地址肯定不够用。正式系统的系统日志也有说地址不够用的异常,待下次出现用户投诉我再研究。 & &不过,在以上的测试系统中,如果人为的搞几台客户端进行验证,ip地址确实是从后面进行分配了。网上查了下有关的资料,也证实了这一点。而在测试系统的压力测试时,发现所有的地址都已被分配出去。因此,我想地址分配应该是正常的。正式系统需要继续观察是否分配了以上现象中提到的ip地址之外的地址。十、参考资料/2011/02/neighbour-table-overflow-sysctl-conf-tunning/Neighbour table overflow ? sysctl.conf tunningIf you have a big network with the hundreds of hosts youcan expect “Neighbour table overflow” error which occurs in large networks whenthere are two many ARP requests which the server is not able to reply. Forexample you’re using server as a DHCP server, cable modems provisioning, etc.Nov 10 03:18:17 myhost Neighbour table overflow.Nov 10 03:18:23 myhost printk: 12 messages suppressed.Of curse, this can be fixed. The solution is to increasethe threshhold values in /etc/sysctl.conf. Add following lines to/etc/sysctl.conf (RH based distros)net.ipv4.neigh.default.gc_thresh1 = 4096net.ipv4.neigh.default.gc_thresh2 = 8192net.ipv4.neigh.default.gc_thresh3 = 8192net.ipv4.neigh.default.base_reachable_time = 86400net.ipv4.neigh.default.gc_stale_time = 86400Save sysctl.conf and execsysctl -p. You can also reboot but it isn’t necessary.The default sysctl.conf filenet.ipv4.ip_forward=0kernel.shmmax=kernel.msgmax=65536kernel.msgmnb=65536net.ipv4.conf.default.rp_filter=1kernel.sysrq=0net.ipv4.conf.default.accept_source_route=0kernel.shmall=kernel.core_uses_pid=1net.ipv4.tcp_syncookies=1“Tuned” systctl.confnet.ipv4.ip_forward=0kernel.shmmax=kernel.msgmax=65536kernel.msgmnb=65536net.ipv4.conf.default.rp_filter=1kernel.sysrq=0net.ipv4.conf.default.accept_source_route=0kernel.shmall=kernel.core_uses_pid=1net.ipv4.tcp_syncookies=1net.ipv4.neigh.default.gc_thresh1 = 4096net.ipv4.neigh.default.gc_thresh2 = 8192net.ipv4.neigh.default.gc_thresh3 = 8192net.ipv4.neigh.default.base_reachable_time = 86400net.ipv4.neigh.default.gc_stale_time = 86400Explanation…The neighbour table is generally known as ARP table andthe default value for gc_thresh1 is 128 (Adjust where the gc will leave arptable alone)[root@myServer ~]# cat /proc/sys/net/ipv4/neigh/default/gc_thresh1128which is not enough for large networks (more than 128hosts). Thats why we need to tune this value. The gc_thresh2 is a soft limit(Tell the gc when to become aggressive with arp table cleaning.) and thegc_thresh3 is a hard limit (Don’t allow the arp table to become bigger thanthis).To enlarge the ARP cache table on the live system run:# sysctl -w net.ipv4.neigh.default.gc_thresh3=8192# sysctl -w net.ipv4.neigh.default.gc_thresh2=8192# sysctl -w net.ipv4.neigh.default.gc_thresh1=4096It is possible that after distro update your systctl.confwill be replaced with the default values. Check this file periodically..本文出自 “大浪淘沙” 博客,请务必保留此出处http://sandjj./1977
感谢关注 Ithao123Centos频道,是专门为互联网人打造的学习交流平台,全面满足互联网人工作与学习需求,更多互联网资讯尽在 IThao123!
Hadoop是一个由Apache基金会所开发的分布式系统基础架构。
用户可以在不了解分布式底层细节的情况下,开发分布式程序。充分利用集群的威力进行高速运算和存储。
Hadoop实现了一个分布式文件系统(Hadoop Distributed File System),简称HDFS。HDFS有高容错性的特点,并且设计用来部署在低廉的(low-cost)硬件上;而且它提供高吞吐量(high throughput)来访问应用程序的数据,适合那些有着超大数据集(large data set)的应用程序。HDFS放宽了(relax)POSIX的要求,可以以流的形式访问(streaming access)文件系统中的数据。
Hadoop的框架最核心的设计就是:HDFS和MapReduce。HDFS为海量的数据提供了存储,则MapReduce为海量的数据提供了计算。
随着国内互联网的发展,产品经理岗位需求大幅增加,在国内,从事产品工作的大部分岗位为产品经理,其实现实中,很多从事产品工作的岗位是不能称为产品经理,主要原因是对产品经理的职责不明确,那产品经理的职责有哪些,本专题将详细介绍产品经理的主要职责
Swift是Apple在WWDC2014所发布的一门编程语言,用来撰写OS X和iOS应用程序[1]。在设计Swift时.就有意和Objective-C共存,Objective-C是Apple操作系统在导入Swift前使用的编程语言
Swift是供iOS和OS X应用编程的新编程语言,基于C和Objective-C,而却没有C的一些兼容约束。Swift采用了安全的编程模式和添加现代的功能来使得编程更加简单、灵活和有趣。界面则基于广受人民群众爱戴的Cocoa和Cocoa Touch框架,展示了软件开发的新方向。
PHP(外文名:PHP: Hypertext Preprocessor,中文名:“超文本预处理器”)是一种通用开源脚本语言。语法吸收了C语言、Java和Perl的特点,利于学习,使用广泛,主要适用于Web开发领域。PHP 独特的语法混合了C、Java、Perl以及PHP自创的语法。它可以比CGI或者Perl更快速地执行动态网页。用PHP做出的动态页面与其他的编程语言相比,PHP是将程序嵌入到HTML(标准通用标记语言下的一个应用)文档中去执行,执行效率比完全生成HTML标记的CGI要高许多;PHP还可以执行编译后代码,编译可以达到加密和优化代码运行,使代码运行更快。
IThao123周刊2007人阅读
linux(28)
DHCP:动态主机设置协议(Dynamic Host Configuration Protocol)是一个局域网的网络协议,使用UDP协议工作,主要有两个用途:给内部网络或网络服务供应商自动分配IP地址给用户给内部网络管理员作为对所有计算机作中央管理的手段。
DDNS(Dynamic Domain Name Server)是动态域名服务的缩写!DDNS是将用户的动态IP地址映射到一个固定的域名解析服务上,用户每次连接网络的时候客户端程序就会通过信息传递把该主机的动态IP地址传送给位于服务商主机上的服务器程序,服务器程序负责提供DNS服务并实现动态域名解析。就是说DDNS捕获用户每次变化的IP 地址,然后将其与域名相对应,这样其他上网用户就可以通过域名来进行交流。
B、安装和配置
B.1、安装DHCP
yum –y install dhcp
B.2、配置DHCP
(CentOS6.3 的配置文件目录在此 /etc/dhcpd/dhcpd.conf,不要搞错了)
DHCP配置文件为/etc/dhcpd.conf,但该文件默认是没有内容的,可以从dhcp安装目录复制一个到/etc下。
cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
vi /etc/dhcpd.conf
B.2.1、配置/etc/dhcpd.conf
ddns-update-
#不要更新DDNS的设置
ignore client-
subnet 192.168.0.0 netmask 255.255.255.0 {
&&&&&&& option routers&&&&&&&&&&&&&&&&&
192.168.0.1;
# --- default gateway
&&&&&&&&&&&&&&&&&&#网关
&&&&&&& option subnet-mask&&&&&&&&&&&&& 255.255.255.0;
&&&&&&&&&&&&&&&&&&#子网掩码
&&&&&&& option nis-domain&&&&&&&&&&&&&& &domain.org&;
&&&&&&& option domain-name&&&&&&&&&&&&& &domain.org&;
&&&&&&&&&&&&&&&&&&#域名
&&&&&&& option domain-name-servers&&&& &202.96.209.133,116.228.111.18;
&&&&&&&&&&&&&&&&&&#域名服务器地址
&&&&&&& 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
#选择点对点节点(默认为混合)。不要改变它,除非你非常了解Netbios。
# option netbios-node-type 2;
&&&&&&& range dynamic-bootp 192.168.0.128 192.168.0.254;
&&&&&&&&&&&&&&&&&& #提供的IP地址端
&&&&&&& default-lease-time 21600;
&&&&&&&&&&&&&&&&&&#默认租期
&&&&&&& max-lease-time 43200;
&&&&&&&&&&&&&&&&&&#最大租期
# we want the nameserver to appear at a fixed address
&&&&&&&&&&&&&&&&&& #以下内容为特定机器保留IP
&&&&&&& host ns {
&&&&&&&&&&&&&&& next-server marvin..
&&&&&&&&&&&&&&& hardware ethernet 12:34:56:78:AB:CD;
&&&&&&&&&&&&&&& fixed-address 207.175.42.254;
B.2.2、配置/etc/sysconfig/dhcpd
# Command line options here
DHCPDARGS=eth0
B.3、启动DHCP
service dhcpd start
#启动DHCP服务
chkconfig dhcpd on
#让DHCP服务随系统而启动
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:1392224次
积分:16016
积分:16016
排名:第481名
原创:234篇
转载:174篇
评论:84条
(4)(3)(3)(1)(1)(4)(2)(7)(5)(1)(1)(3)(2)(1)(1)(1)(5)(3)(11)(21)(12)(11)(13)(18)(26)(22)(17)(1)(7)(24)(25)(26)(9)(9)(8)(7)(33)(2)(17)(23)(17)

我要回帖

更多关于 contos7 配置虚拟主机 的文章

 

随机推荐