linux的dhcp的安装,linux下DHCP的安装配置

一,首先是安装DHCP的rpm包 ,然后配置下列文档,如在10.255.6.0子网掩码是255.255.255.0 的

DHCP的配置文档/etc/dhcpd.conf

====================================================

ddns-update-style interim;

ignore client-updates;

subnet 10.255.6.0 netmask 255.255.255.0 {

# --- default gateway

option routers                  10.255.0.1;

option subnet-mask              255.255.0.0;

option nis-domain               "domain.org";

option domain-name              "domain.org";

option domain-name-servers      192.168.1.1;

option time-offset              -18000; # Eastern Standard Time

#       option ntp-servers              10.255.0.1;

#       option netbios-name-servers     10.255.0.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 10.255.6.0 10.255.6.250;

default-lease-time 21600;

max-lease-time 43200;

# 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;

}

}

=========================================================

以下是分配IP地址的数据库文件  /var/lib/dhcp/dhcpd.leases

=========================================================

# All times in this file are in UTC (GMT), not your local timezone.   This is

# not a bug, so please don't ask about it.   There is no portable way to

# store leases in the local timezone, so please don't request this as a

# feature.   If this is inconvenient or confusing to you, we sincerely

# apologize.   Seriously, though - don't ask.

# The format of this file is documented in the dhcpd.leases(5) manual page.

# This lease file was written by isc-dhcp-V3.0pl1

lease 10.255.6.163 {

starts 0 2008/06/22 09:52:01;

ends 0 2008/06/22 15:52:01;

binding state active;

next binding state free;

hardware ethernet 00:e0:4d:55:db:68;

uid "/001/000/340MU/333h";

client-hostname "C50039780A554CA";

}

lease 10.255.6.163 {

starts 0 2008/06/22 09:53:01;

ends 0 2008/06/22 15:53:01;

binding state active;

next binding state free;

hardware ethernet 00:e0:4d:55:db:68;

uid "/001/000/340MU/333h";

client-hostname "C50039780A554CA";

}

lease 10.255.6.163 {

starts 0 2008/06/22 09:53:01;

ends 0 2008/06/22 09:53:13;

tstp 0 2008/06/22 09:53:13;

binding state free;

hardware ethernet 00:e0:4d:55:db:68;

uid "/001/000/340MU/333h";

client-hostname "C50039780A554CA";

}

lease 10.255.6.163 {

starts 0 2008/06/22 09:53:25;

ends 0 2008/06/22 15:53:25;

binding state active;

next binding state free;

hardware ethernet 00:e0:4d:55:db:68;

uid "/001/000/340MU/333h";

client-hostname "C50039780A554CA";

}

lease 10.255.6.153 {

starts 0 2008/06/22 09:58:29;

ends 0 2008/06/22 15:58:29;

binding state active;

next binding state free;

hardware ethernet 00:18:37:06:a2:cf;

uid "/001/000/0307/006/242/317";

client-hostname "MICROSOF-D7C616";

}

lease 10.255.6.153 {

starts 0 2008/06/22 09:58:55;

ends 0 2008/06/22 15:58:55;

binding state active;

next binding state free;

hardware ethernet 00:18:37:06:a2:cf;

uid "/001/000/0307/006/242/317";

client-hostname "MICROSOF-D7C616";

}

lease 10.255.6.153 {

starts 0 2008/06/22 09:58:55;

ends 0 2008/06/22 09:59:03;

tstp 0 2008/06/22 09:59:03;

binding state free;

hardware ethernet 00:18:37:06:a2:cf;

uid "/001/000/0307/006/242/317";

client-hostname "MICROSOF-D7C616";

}

lease 10.255.6.153 {

starts 0 2008/06/22 10:00:29;

ends 0 2008/06/22 16:00:29;

binding state active;

next binding state free;

hardware ethernet 00:18:37:06:a2:cf;

uid "/001/000/0307/006/242/317";

client-hostname "MICROSOF-D7C616";

}

============================================

到此dhcp算是配置成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值