一、实验的目的:
    实现以下的要求的DHCPserver,了解子网内的IP分配的情况。

二、实验目标
虚拟机 vm1:192.168.6.3/24属于子网VMnet8。

在其上建立DHCPserver:
默认网关                        192.168.6.4
DNS                             200.3.4.10。200.3.4.20
默认租约                        1天
最长租约                        2天
用于分配的IP范围                192.168.6.81~192.168.6.200
主机08:00:11:22:33:44      ip  192.168.6.38,主机名web

三、实验过程
1、rpm -qa | grep dhcp(查看dhcp软件是否安装)
    [root@localhost root]# rpm -qa | grep dhcp

2、用(我的电脑)来FTP登录。ftp://192.168.6.3/,文件-》登录-》输入帐号(yanji)和password(yanji123)用(除了root用户之外的用户)登录,再将dhcp-3.0pl1-23.i386.rpm和dhcp-devel-3.0pl1-23.i386.rpm复制进去。

3、rpm -ivh dhcp-3.0pl1-23.i386.rpm
    [root@localhost 01]# rpm -ivh dhcp-3.0pl1-23.i386.rpm
    warning: dhcp-3.0pl1-23.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
    Preparing...                ########################################### [100%]
      1:dhcp                   ########################################### [100%]

4、rpm -ivh dhcp-devel-3.0pl1-23.i386.rpm
    [root@localhost 01]# rpm -ivh dhcp-devel-3.0pl1-23.i386.rpm
    warning: dhcp-devel-3.0pl1-23.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
    Preparing...                ########################################### [100%]
       1:dhcp-devel             ########################################### [100%]

5、rpm -qa | grep dhcp(确认dhcp软件是否安装)
    [root@localhost 01]# rpm -qa | grep dhcp
    dhcp-3.0pl1-23
    dhcp-devel-3.0pl1-23

 6、updatedb(为了下一步可以搜索到)
     [root@localhost 01]#updatedb
 7、locate dhcpd.conf
     [root@localhost 01]# locate dhcpd.conf
     /etc/log.d/conf/services/dhcpd.conf
     /usr/share/doc/dhcp-3.0pl1/dhcpd.conf.sample
     /usr/share/man/man5/dhcpd.conf.5.gz
 
 8、[root@localhost 01]# cp /usr/share/doc/dhcp-3.0pl1/dhcpd.conf.sample /etc/dhcpd.conf
    [root@localhost root]# vi /etc/dhcpd.conf
  option time-offset              28800;  # 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  192.168.6.81 192.168.6.200;
        default-lease-time 86400;
        max-lease-time 172800;

        # 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;
        }
        host web {
                next-server marvin.redhat.com;
                hardware ethernet 08:00:11:22:33:44;
                fixed-address 192.168.6.38;
        }
    [root@localhost root]# service dhcpd start
    启动 dhcpd:

9、Windows,右键VMnet8。属性-》TCP/IPv4,把“自己主动获得IP地址”和”使用以下的DNSserver地址“打上勾。分别输入200.3.4.10和200.3.4.20的DNSserver号,按“确定”。再到VMware里,“编辑”-》“虚拟网络编辑器”。把VMnet8和VMnet1
把"使用本地DHCP服务将IP地址分配给虚拟机”的勾去掉。

等几分钟。

10、在Windows里面。命令行输入“Ipconfig /all”
以太网适配器 VMware Network Adapter VMnet8:

   连接特定的 DNS 后缀 . . . . . . . : or.org
   描写叙述. . . . . . . . . . . . . . . : VMware Virtual Ethernet Adapter for VMnet8
   物理地址. . . . . . . . . . . . . : 00-50-56-C0-00-08
   DHCP 已启用 . . . . . . . . . . . : 是
   自己主动配置已启用. . . . . . . . . . : 是
   本地链接 IPv6 地址. . . . . . . . : fe80::4117:b3f0:133b:52de%13(首选)
   IPv4 地址 . . . . . . . . . . . . : 192.168.6.200(首选)
   子网掩码  . . . . . . . . . . . . : 255.255.255.0
   获得租约的时间  . . . . . . . . . : 2015年3月27日 19:08:31
   租约过期的时间  . . . . . . . . . : 2015年3月28日 19:08:30
   默认网关. . . . . . . . . . . . . : 192.168.6.4
   DHCP server . . . . . . . . . . . : 192.168.6.3
   DHCPv6 IAID . . . . . . . . . . . : 453005398
   DHCPv6 client DUID  . . . . . . . : 00-01-00-01-1C-45-73-32-00-12-7B-70-A0-F2

   DNS server  . . . . . . . . . . . : 200.3.4.10
                                       200.3.4.20
   TCPIP 上的 NetBIOS  . . . . . . . : 已启用

四、实验的体会
有点忘记步骤了。

之前给其它虚拟机的DHCP分配IP地址,影响了效果。后面禁用即可

建立DHCPserver的更多相关文章

  1. [原] 利用 OVS 建立 VxLAN 虚拟网络实验

    OVS 配置 VxLAN HOST A ------------------------------------------ | zh-veth0(10.1.1.1) VM A | | ---|--- ...

  2. Atitit.如何建立研发体系

    Atitit.如何建立研发体系 组织,流程,prj..Mana  oppm 发管理是一个完整的管理体系,从结构上来讲,它主要由四个方面的内容构架而成:组织结构与岗位设置 管理流程与工作流程..项目及管 ...

  3. 在 Linux 上使用 Jexus + Mono 建立 Asp.Net 网站.

    godaddy 买了个net空间,一点也不好用. 几个G的数据, 上传数据只有几kb , 想用 ssh 登录上去用 wget 下载,也不行 windows的主机貌似没有 ssh 功能... 后来实在忍 ...

  4. ASP.NET Core管道深度剖析(4):管道是如何建立起来的?

    在<管道是如何处理HTTP请求的?>中,我们对ASP.NET Core的请求处理管道的构成以及它对请求的处理流程进行了详细介绍,接下来我们需要了解的是这样一个管道是如何被构建起来的.这样一 ...

  5. 读书笔记--SQL必知必会--建立练习环境

    书目信息 中文名:<SQL必知必会(第4版)> 英文名:<Sams Teach Yourself SQL in 10 Minutes - Fourth Edition> MyS ...

  6. 【转】SQL Server -- 已成功与服务器建立连接,但是在登录过程中发生错误

    SQL Server -- 已成功与服务器建立连接,但是在登录过程中发生错误 最近在VS2013上连接远程数据库时,突然连接不上,在跑MSTest下跑的时候,QTAgent32 crash.换成IIS ...

  7. 黑马程序员——ARC机制总结和用ARC建立模型

    ARC 全称:Automatic Reference Counting 使用ARC 只需要在建立一个新的项目的时候把 下面的√打上 Xcode5以后都会默认建议开发者使用ARC机制 新的项目中如果有部 ...

  8. gRPC源码分析2-Server的建立

    gRPC中,Server.Client共享的Class不是很多,所以我们可以单独的分别讲解Server和Client的源码. 通过第一篇,我们知道对于gRPC来说,建立Server是非常简单的,还记得 ...

  9. word 2010 建立多级结构和目录

    点击“开始”中的“样式”中右下角按钮   点击弹出窗口中最下方第三个按钮   点击“推荐”选项卡,再选择要显示的标题,然后点击“显示”.然后按照需要,分别把“标题3”“标题4”等显示.最后点确定即可. ...

随机推荐

  1. js 日期时间大小比较

    <body> 开始时间:<input onfocus="setday(this)" id="startTime" name="sta ...

  2. Farseer.net轻量级ORM开源框架 V1.0 开发目标

    本篇主要给大家说明下在V1.0中,计划开发的任务的状态.按照国际惯例.上大表格 开发计划状态 编号 模块 状态 说明 1  分离Utils.Extend.UI  √  在V0.2版本中,是集成在一个项 ...

  3. 2015年度精品 最新力作32位和64位xp,win7,win8,win10系统下载(电脑城专用版)

    一.系统主要特点 1.安装维护方便快速 - 全自动无人值守安装,采用万能GHOST技术,安装系统过程只需3-5分钟,适 合新旧各种机型. - 集成常见硬件驱动,智能识别+预解压技术,绝大多数硬件可以快 ...

  4. AIX 10201 ASM RAC安装+升级到10204

    1:查看系统版本 [rac1:root:/hacmp/hacmp5.4/ha5.4/installp/ppc] oslevel -s 6100-06-06-1140 lslpp -al bos.adt ...

  5. leetcode_998. Maximum Binary Tree II

    https://leetcode.com/problems/maximum-binary-tree-ii/ 在654. Maximum Binary Tree版本的建树基础上,在最后插入一个数. 新节 ...

  6. Python list列表的常用操作方法

    本文主要介绍了Python中列表(List)的详解操作方法,包含创建.访问.删除.排序.切片,乘等操作方法 1.创建列表:把逗号分隔的不同的数据项使用方括号括起来 list = [1,2,3,'Jam ...

  7. AttributeError: 'dict' object has no attribute 'encode'

    首先这是一个很简单的 运行时错误: 错误分析: AttributeError:属性错误,造成这种错误的原因可能有: 你尝试访问一个不存在的属性或方法.检查一下拼写!你可以使用内建函数 dir 来列出存 ...

  8. ZXing.dll 生成二维码 C# winform net4.5

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  9. CE工具里自带的学习工具--第二关

    图解:

  10. new Buffer 生成二进制数据

    node编辑环境下: > new Buffer("admin")<Buffer 61 64 6d 69 6e> 通过post请求,服务端接收到是流数据,必须把流数 ...