收藏 分享(赏)

fedora8配置单个作用域和多个作用域的DHCP服务.doc

上传人:精品资料 文档编号:10275034 上传时间:2019-10-27 格式:DOC 页数:5 大小:60.50KB
下载 相关 举报
fedora8配置单个作用域和多个作用域的DHCP服务.doc_第1页
第1页 / 共5页
fedora8配置单个作用域和多个作用域的DHCP服务.doc_第2页
第2页 / 共5页
fedora8配置单个作用域和多个作用域的DHCP服务.doc_第3页
第3页 / 共5页
fedora8配置单个作用域和多个作用域的DHCP服务.doc_第4页
第4页 / 共5页
fedora8配置单个作用域和多个作用域的DHCP服务.doc_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

1、fedora8 配置单个作用域和多个作用域的 DHCP 服务一、单个作用域假设 dhcp 服务器地址在 192.168.0 网段,网关:192.168.0.1,dns:202.100.64.68本人水平有限,请高手指点-#先查看 dhcp 的安装情况,貌似 Fedora8 里没有 dhcp 安装包,请自行下载或 yumrootlocalhost # rpm -qa | grep dhcplibdhcp6client-0.10-51.fc8libdhcp-1.27-3.fc8dhcpv6-client-0.10-51.fc8libdhcp4client-3.0.6-10.fc8dhcp-3.0.

2、6-10.fc8#先查看一下 dhcp 的主配文件,需要咱们自己来写,这样很麻烦,我们可以从主配文件中看到有 sample 的位置,用 sample 吧,很方便。rootlocalhost # cd /etcrootlocalhost etc# more dhcpd.conf-# dhcp Server Configuration file.# see /usr/share/doc/dhcp*/dhcpd.conf.sample#-rootlocalhost etc# cd /usr/share/docrootlocalhost doc# ls *dhcp*dhcp-3.0.6:api+pro

3、tocol _Fedora_contrib rfc2131.txtdhcpd.conf.sample IANA-arp-parameters rfc2132.txtdraft-ietf-dhc-authentication-14.txt README rfc2485.txtdraft-ietf-dhc-dhcp-dns-12.txt README.ldap rfc2489.txtdraft-ietf-dhc-failover-07.txt RELNOTES rfc951.txtdraft-ietf-dhc-ldap-schema-01.txt rfc1542.txtdhcpv6-client-

4、0.10:dhcp6c.conf ReadMelibdhcp-1.27:ChangeLog COPYING README TODO-#现在把那个 sample 复制到/etc 下,rootlocalhost doc# cp -p /usr/share/doc/dhcp-3.0.6/dhcpd.conf.sample /etcrootlocalhost doc# cd /etcrootlocalhost etc# ls *dhcp*dhcpd.conf dhcpd.conf.sample#把原来那个主配文件改名,因为咱们是直接在 sample 里改配置,然后改成主配文件名字rootlocalho

5、st etc# mv dhcpd.conf dhcpd.conf.bakrootlocalhost etc# vi dhcpd.conf.sample-#这是没改动过的ddns-update-style interim;ignore client-updates;subnet 192.168.0.0 netmask 255.255.255.0 # - default gatewayoption routers 192.168.0.1;option subnet-mask 255.255.255.0;option nis-domain “domain.org“;option domain-nam

6、e “domain.org“;option domain-name-servers 192.168.1.1;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). Dont change this unless# - you understand Netbios very well# option

7、netbios-node-type 2;range dynamic-bootp 192.168.0.128 192.168.0.254;default-lease-time 21600;max-lease-time 43200;# we want the nameserver to appear at a fixed addresshost ns next-server ;hardware ethernet 12:34:56:78:AB:CD;fixed-address 207.175.42.254;-#这是经过修改的ddns-update-style interim;ignore clien

8、t-updates;subnet 192.168.0.0 netmask 255.255.255.0 #要分配的网段# - default gatewayoption routers 192.168.0.1; #网关option subnet-mask 255.255.255.0; #子网掩码option nis-domain “domain.org“; option domain-name “domain.org“; option domain-name-servers 202.100.64.68; #dns 服务器地址option time-offset -18000; # Eastern

9、 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). Dont change this unless# - you understand Netbios very well# option netbios-node-type 2;range dynamic-bootp 192.168.0.128 192.168.0.254; #可分配的地址范围default-leas

10、e-time 21600; #默认租约时间max-lease-time 43200; #最大租约时间# we want the nameserver to appear at a fixed address #这部分是给固定客户端分配 IP 地址的host ns next-server ; hardware ethernet 12:34:56:78:AB:CD; #固定客户端 MAC 地址fixed-address 207.175.42.254; #固定客户端分配的 ip地址-#别忘了配置完后把名字要改成 dhcp 的主配置文件名rootlocalhost etc# mv dhcpd.conf

11、.sample dhcpd.conf#启动 dhcp 服务rootlocalhost etc# service dhcpd start启动 dhcpd: 确定找个客户端,自动获取一下,完成二、多个作用域前面的做法都一样,把 sample 文件复制到/etc 下,改名 dhcpd.conf。编辑 dhcpd.conf 文件rootlocalhost etc# vi dhcpd.conf-ddns-update-style interim;ignore client-updates;shared-network holiday group #注意这里要加这么两句,那个“holiday”是给这个超级

12、作用域起的名字subnet 192.168.0.0 netmask 255.255.255.0 #第一个网段# - default gatewayoption routers 192.168.0.1; option subnet-mask 255.255.255.0;option nis-domain “domain.org“; option domain-name “domain.org“; option domain-name-servers 202.100.64.68;option time-offset -18000; # Eastern Standard Time# option n

13、tp-servers 192.168.1.1;# option netbios-name-servers 192.168.1.1;# - Selects point-to-point node (default is hybrid). Dont change this unless# - you understand Netbios very well# option netbios-node-type 2;range dynamic-bootp 192.168.0.128 192.168.0.254; default-lease-time 21600; max-lease-time 4320

14、0; # we want the nameserver to appear at a fixed address host ns1 #假设这台主机分配固定 IPnext-server ; hardware ethernet 12:34:56:78:AB:CD; fixed-address 192.168.0.200; subnet 192.168.1.0 netmask 255.255.255.0 #第二个网段# - default gatewayoption routers 192.168.1.1; option subnet-mask 255.255.255.0;option nis-do

15、main “domain.org“; option domain-name “domain.org“; option domain-name-servers 202.100.64.68;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). Dont change this unless# - yo

16、u understand Netbios very well# option netbios-node-type 2;range dynamic-bootp 192.168.1.128 192.168.1.254; default-lease-time 21600; max-lease-time 43200; # we want the nameserver to appear at a fixed address host ns2 #假设这台主机分配固定 IPnext-server ; hardware ethernet 12:34:56:78:24:CD; fixed-address 192.168.1.200; #注意这里的,不能少-#如果还有作用域,继续添加就好了,相信大家已经看懂了,只是添加了两句话而已。#启动 dhcp 服务rootlocalhost etc# service dhcpd start启动 dhcpd: 确定找个交换机或服务器再配置个 dhcp 中继,找两个客户端,自动获取一下,完成

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报