RHEL5dhcp中继.doc_第1页
RHEL5dhcp中继.doc_第2页
RHEL5dhcp中继.doc_第3页
RHEL5dhcp中继.doc_第4页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

RHEL5下的DHCP服务和DHCP中继rootlocalhost # rpm -q dhcppackage dhcp is not installed ( 查看dhcp包没有安装)rootlocalhost # mount /dev/cdrom /mnt (挂载光盘并安装dhcp包)mount: block device /dev/cdrom is write-protected, mounting read-onlyrootlocalhost # rpm -ivh /mnt/Server/dhcp-3.0.5-3.el5.i386.rpmwarning: /mnt/Server/dhcp-3.0.5-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186Preparing. # 100% 1:dhcp # 100%rootlocalhost # vi /etc/dhcpd.conf (编辑dhcp配置文件,建两个作用域)# DHCP Server Configuration file.# see /usr/share/doc/dhcp*/dhcpd.conf.sample#ddns-update-style interim;default-lease-time 21600;max-lease-time 43200;option domain-name ;option domain-name-servers 0;subnet netmask range 00 00; option subnet-mask ; option routers 54;subnet netmask range 00 00; option subnet-mask ; option routers 54;/etc/dhcpd.conf 19L, 522C (保存退出)rootlocalhost # service dhcpd start (启动dhcp服务)Starting dhcpd: OK rootlocalhost # netstat -nupl (查看当前的UDP端口侦听)Active Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program nameudp 0 0 :943 :* 1615/rpc.statdudp 0 0 :946 :* 1615/rpc.statdudp 0 0 :67 :* 3438/dhcpd udp 0 0 :111 :* 1590/portmapudp 0 0 :631 :* 1850/cupsd客户端获取到的IP信息如下:rootlocalhost # cat /var/lib/dhcpd/dhcpd.leases (查看租约文件)lease 00 starts 5 2008/11/14 10:18:35;ends 5 2008/11/14 16:18:35;binding state active;next binding state free;hardware ethernet 00:03:ff:44:1a:b9;uid 001000003377D032271;client-hostname dc;rootlocalhost # chkconfig -level 35 dhcpd on (设置dhcp服务在35级别自动启动)DHCP中继的实现:ogin as: root (使用管理员用户登陆)root54s password:Last login: Fri Nov 14 04:33:18 2008 from rootlocalhost # mount /dev/cdrom /mnt (挂载光盘并安装dhcp包)mount: block device /dev/cdrom is write-protected, mounting read-onlyrootlocalhost # rpm -ivh /mnt/Server/dhcp-3.0.5-3.el5.i386.rpmwarning: /mnt/Server/dhcp-3.0.5-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186Preparing. # 100% 1:dhcp # 100%rootlocalhost # rpm -ql dhcp |grep /etc (查看dhcp包包含在/etc目录下的文件信息)/etc/dhcpd.conf/etc/rc.d/init.d/dhcpd/etc/rc.d/init.d/dhcrelay/etc/sysconfig/dhcpd/etc/sysconfig/dhcrelayrootlocalhost # vi /etc/sysconfig/dhcrelay (编辑/etc/sysconfig/dhcrelay 文件并启用中继功能)# Command line options hereINTERFACES=eth0 eth1 (定义在那个网卡上启用中继功能)DHCPSERVERS=0 (定义dhcp服务器的IP)rootlocalhost # service dhcrelay start (启用中继服务)Starting dhcrelay: Internet Systems Consortium DHCP Relay Agent V3.0.5-RedHatCopyright 2004-2006 Internet Systems Consortium.All rights reserved.For info, please visit /sw/dhcp/Listening on LPF/eth1/00:03:ff:4d:1a:b9Sending on LPF/eth1/00:03:ff:4d:1a:b9Listening on LPF/eth0/00:03:ff:42:1a:b9Sending on LPF/eth0/00:03:ff:42:1a:b9Sending on Socket/fallback OK rootlocalhost # netstat -unpl (查看UDP端口的侦听信息)Active Internet connections (only servers)Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program nameudp 0 0 :646 :* 1742/rpc.statdudp 0 0 :649 :* 1742/rpc.statdudp 0 0 :67 0.0.0

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论