DHCP 服务器的配置过程
2010-04-30 16:58
411 查看
DHCP 服务器的配置过程
[b][b][b][b][b]以前在做实验的过程中总结和写的一些教程的一些资料,一直没时间发布到博客上面,五一到了,终于有点时间发布啦!关于Linux上面还会有RHCE系列的学习笔记发表[/b][/b][/b][/b]
[/b]DHCP的安装包是:dhcp-3.0.1-12_EL.i386.rpm
守护进程是:dchpd
服务器的配置过程:
1、安装 rpm包
[root@cisco ~]# cd /media/cdrom/RedHat/RPMS/
[root@cisco RPMS]# rpm -ivh dhcp-3.0.1-12_EL.i386.rpm
warning: dhcp-3.0.1-12_EL.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
package dhcp-3.0.1-12_EL is already installed
[root@cisco RPMS]#
2、复制配置文件的样本:
[root@cisco RPMS]# cp /usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample /etc/dhcpd.conf
3、编辑配置文件:
[root@cisco RPMS]# vi /etc/dhcpd.conf
subnet 192.168.20.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.20.1;
option subnet-mask 255.255.255.0;
option nis-domain "domain.org";
option domain-name "benet.com";
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). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.20.100 192.168.20.200;
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;
}
}
www.wqmsl.cn4、启动 dhcp 服务即可
[root@cisco ~]# service dhcpd start
5、多网卡配置选择的配置文件
[root@cisco ~]# cat /etc/sysconfig/dhcpd
# Command line options here
DHCPDARGS= 这里添网卡即可
6、租约文件:
[root@cisco ~]# cat /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.0.1
lease 192.168.20.200 {
starts 5 2009/05/29 05:16:44;
ends 5 2009/05/29 11:16:44;
tstp 5 2009/05/29 11:16:44;
binding state active;
next binding state free;
hardware ethernet 00:0c:29:00:77:3e;
}
DHCP 客户端的配置
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
IPADDR=192.168.20.10
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
[root@localhost ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:00:77:3E
inet addr:192.168.20.200 Bcast:192.168.20.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe00:773e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42757 errors:0 dropped:0 overruns:0 frame:0
TX packets:207 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2669265 (2.5 MiB) TX bytes:24116 (23.5 KiB)
Interrupt:11 Base address:0x2000
我们一起进步,有问题一起研究哈
QQ:459176770
附件:http://down.51cto.com/data/2355691
[b][b][b][b][b]以前在做实验的过程中总结和写的一些教程的一些资料,一直没时间发布到博客上面,五一到了,终于有点时间发布啦!关于Linux上面还会有RHCE系列的学习笔记发表[/b][/b][/b][/b]
[/b]DHCP的安装包是:dhcp-3.0.1-12_EL.i386.rpm
守护进程是:dchpd
服务器的配置过程:
1、安装 rpm包
[root@cisco ~]# cd /media/cdrom/RedHat/RPMS/
[root@cisco RPMS]# rpm -ivh dhcp-3.0.1-12_EL.i386.rpm
warning: dhcp-3.0.1-12_EL.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
package dhcp-3.0.1-12_EL is already installed
[root@cisco RPMS]#
2、复制配置文件的样本:
[root@cisco RPMS]# cp /usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample /etc/dhcpd.conf
3、编辑配置文件:
[root@cisco RPMS]# vi /etc/dhcpd.conf
subnet 192.168.20.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.20.1;
option subnet-mask 255.255.255.0;
option nis-domain "domain.org";
option domain-name "benet.com";
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). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 192.168.20.100 192.168.20.200;
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;
}
}
www.wqmsl.cn4、启动 dhcp 服务即可
[root@cisco ~]# service dhcpd start
5、多网卡配置选择的配置文件
[root@cisco ~]# cat /etc/sysconfig/dhcpd
# Command line options here
DHCPDARGS= 这里添网卡即可
6、租约文件:
[root@cisco ~]# cat /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.0.1
lease 192.168.20.200 {
starts 5 2009/05/29 05:16:44;
ends 5 2009/05/29 11:16:44;
tstp 5 2009/05/29 11:16:44;
binding state active;
next binding state free;
hardware ethernet 00:0c:29:00:77:3e;
}
DHCP 客户端的配置
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp
IPADDR=192.168.20.10
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
[root@localhost ~]# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0C:29:00:77:3E
inet addr:192.168.20.200 Bcast:192.168.20.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe00:773e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:42757 errors:0 dropped:0 overruns:0 frame:0
TX packets:207 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2669265 (2.5 MiB) TX bytes:24116 (23.5 KiB)
Interrupt:11 Base address:0x2000
我们一起进步,有问题一起研究哈
QQ:459176770
附件:http://down.51cto.com/data/2355691
相关文章推荐
- 构建DHCP服务器及配置DHCP中继的安装过程
- entOS 5.4 下配置DHCP服务器全过程
- CentOS 5.4 下配置DHCP服务器全过程
- Linux下DHCP服务器配置全过程
- Windows服务器配置与管理》DHCP服务器搭建与管理
- Linux下DHCP服务器配置与应用
- linux配置dhcp服务器authoritative参数作用
- DHCP服务器配置『罗斌原创』
- C3550配置作为DHCP服务器工程实例
- 实验来介绍 DHCP服务器工作原理和配置
- DHCP服务器配置
- windows server 2008 DNS ,DHCP 服务器的配置(支持IPv6) :
- DHCP服务器配置介绍
- DHCP服务器配置
- Linux系统上DHCP服务器的配置
- CentOS下独立SVN服务器的安装与配置详细过程
- Linux安装与配置samb服务器的过程以及遇到的问题
- 局域网中简单的dhcp服务器的配置
- 记一次对学校DHCP服务器的渗透过程
- windows 2003 配置dhcp服务器