基于CentOS的Linux版本下的设置#rpm -qa|grep dhcp(检查安装dhcp套件与否)没有安装是话,先配置虚拟机可以上网,后进行下步骤#yum -y install dhcp(安装dhcp套件)接下来对主要的设定档进行设置的一个小案例:[root@Linuxidc ~]# updatedb &(要等一段时间出现完成的提示) [root@Linuxidc ~]# locate dhcpd.conf.sample
/usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample[root@Linuxidc ~]# cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcp.conf[root@Linuxidc ~]# mv /etc/dhcpd.conf /etc/dhcpd.conf.bak(备份)[root@Linuxidc ~]# mv /etc/dhcp.conf /etc/dhcpd.conf我所在的局域网是网关是192.168.1.1 DNS为202.102.224.68 ip范围为一个内网范围[root@Linuxidc ~]# vi /etc/dhcpd.confddns-update-style none;
ignore client-updates;subnet 192.168.1.0 netmask 255.255.255.0 {# --- default gateway
option routers 192.168.1.1;
option subnet-mask 255.255.255.0; option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 202.102.224.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). Don"t change this unless
# -- you 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#设置固定Ip根据MAC地址
host ns {
hardware ethernet MAC地址;
fixed-address 192.168.1.188;
# }
}[root@Linuxidc ~]# /etc/init.d/dhcpd restart最后在客户端设置一下即可在DOS下ipconfig/all即可查看相关信息Windows下Linux虚拟机磁盘分区扩容Ubuntu 10.10 安装低版本的gcc和g++编译器相关资讯 VMWARE
- VMware在DockerCon EU宣布开源“ (12/03/2015 13:13:26)
- 使用VMware克隆功能的一个网络配置 (08/13/2015 20:51:48)
- VMware推出容器友好的Linux系统 (04/21/2015 11:51:51)
| - VMware Workstation 12 Pro 发布下 (08/26/2015 19:21:49)
- VMware推出自家Linux版本 Photon (04/22/2015 17:27:21)
- VMware如何在中国取得成功? (04/20/2015 17:18:00)
|
本文评论 查看全部评论 (0)