<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>冷博客 &#187; Linux</title>
	<atom:link href="http://loneblog.com/blog/category/about-linux/feed" rel="self" type="application/rss+xml" />
	<link>http://loneblog.com/blog</link>
	<description>见的人多了，我就更喜欢狗——罗曼·罗兰</description>
	<lastBuildDate>Sun, 27 May 2012 09:30:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>搭建简单的pptp vpn</title>
		<link>http://loneblog.com/blog/make-pptp-vpn-server.html</link>
		<comments>http://loneblog.com/blog/make-pptp-vpn-server.html#comments</comments>
		<pubDate>Fri, 18 Mar 2011 01:40:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[pptp]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://loneblog.com/blog/make-pptp-vpn-server.html</guid>
		<description><![CDATA[今天使用smoking测试一个百兆出口，冷博客觉得这个出口闲着也是闲着，不如给我下载东西用 于是乎搭建一个简单的VPN服务器来独享百兆，哈哈。 一、安装 如果使用MPPE微软的加密协议，dkms和kernel_ppp_mppe，这两个需要安装，而且基础的yum源找不到这两个软件，当然这也跟你使用的源有关。 所有软件都可以从 http://poptop.sourceforge.net/yum/stable/packages/ 这里找到。 安装ppp和pptpd，可以rpm或者yum #yum install –y ppp #yum install –y pptpd &#160; 二、配置 /etc/pptpd.conf配置 localip&#160; 服务器监听端口ip remoteip 分配给VPN用户的IP段，比如192.168.1.1-100 &#160; /etc/ppp/options.pptpd配置 ms-dns 这是分给windows的dns，写一个公网的就行，不写不能上网 &#160; /etc/ppp/chap-secrets 配置 其中自带一个名叫u20的用户，格式如下 用户名&#160;&#160; 服务名&#160;&#160; 密码&#160;&#160; IP 比如我新增加的一个用户 loneblog&#160; vpn passwd&#160;&#160;&#160; 192.168.1.2 分配的IP只有一个就是192.168.1.2了.也就是说只能一个人同时使用. 如果你想多人同时使用&#8230;可以将IP栏改为*，据说支持40并发，不过我们一般需要一人一号 &#160; NAT设置和ipforward #iptables –t nat –A POSTROUTING –s 192.168.1.0/24 –j SNAT &#8211;to 9.9.9.9 [...]]]></description>
		<wfw:commentRss>http://loneblog.com/blog/make-pptp-vpn-server.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>谈谈Linux的学习</title>
		<link>http://loneblog.com/blog/talk-about-linux-learning.html</link>
		<comments>http://loneblog.com/blog/talk-about-linux-learning.html#comments</comments>
		<pubDate>Mon, 21 Feb 2011 14:59:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[rhce]]></category>
		<category><![CDATA[鸟哥]]></category>

		<guid isPermaLink="false">http://loneblog.com/blog/?p=1503</guid>
		<description><![CDATA[09年一次偶然的机会，冷博客接触到了生产环境的Linux。就算开始了对Linux的学习，到现在也仅有1年多的时间。 在这一年多的时间里，冷博客从自己动手搭建一个DNS服务器到RHCE证书的考取，其中经历了一些坎坷，现把一些学习经验分享给大家。 首先不得不提的是鸟哥——《鸟哥的Linux私房菜》 冷博客Linux的入门教材，相信也是很多Linux爱好者心中的大神。 我觉得鸟哥的基础篇讲的是不错的，反复看过两遍。不过其中死记硬背的内容过多，很多内容可以从帮助文档中找到，这点鸟哥没有详细的讲过。 服务器篇部分内容个人认为鸟哥的理解有偏颇，还是那句话“尽信书不如无书”。 关于深度和广度 Linux中的服务和程序随便拿出来一个都够研究半年的了。 关于培训 参加培训的大部分为了应试。可惜的是，国内还没有特牛的培训机构（原厂除外哈）可以像培训cisco认证一样大量生产rhce，所以如果只为了考证，没有基础而直接去培训中心的话，还是很可能挂。虽然很多培训中心都有免费重考的机会，不过你浪费的青春没有补救。 关于桌面环境 使用Linux当日常的桌面环境是非常不明智的，你会因此耗费大量的时间和精力。 尤其是你的硬件不能被Linux安装时识别，你会陷入这样的循环：在墙上挂一幅油画——找钉子——买钉子——做公交车买钉子——办公交卡——搭车去公交站办卡——找邻居搭车——打电话找邻居，到最后也许会忘了初衷，或者筋疲力竭。 更不要试图使用U盘、PXE或者量产U盘里安装Linux，尤其是你有光驱的情况下（RHEL是个例外） up：不要用ultroiso或者xxcreate，要用dd写入usb device，更正上面内条 还要多说几句，看到我们用的windows视窗操作系统了么？世界首富领导的世界顶尖团队，全都是各方面的高手，用了大量的人力物力和财力，才做成了现在的windows7。 即使这样，windows7还是漏洞百出，不容易使用。更不要说是一个论坛支持或者某个公司开源免费的Linux发行版本了，根本做不到，也不能做到微软这样的水平（冷博客没用过Apple OS，不敢妄加评论，虽然他也是unix一个分支，不过定制化的东西太多） 最后 这篇博文写了很久，应该是冷博客拖得时间最长的博文了，我一直使用live writer写草稿，然后想起一些来就写下来，都是经过反复斟酌过的经验之谈。]]></description>
		<wfw:commentRss>http://loneblog.com/blog/talk-about-linux-learning.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>iptables&#124;Netfilter基本配置说明手册</title>
		<link>http://loneblog.com/blog/iptables-netfilter.html</link>
		<comments>http://loneblog.com/blog/iptables-netfilter.html#comments</comments>
		<pubDate>Thu, 10 Feb 2011 01:51:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[netfilter]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://loneblog.com/blog/iptables-netfilter.html</guid>
		<description><![CDATA[今天来说一下Netfilter相关事宜。 选取了培亚的培训视频截图（不知道算不算侵权），RHCE的课程中培亚的这一节课讲得非常好。 &#160; iptables的三个tables，用-t表示 共3+3+2个chains 每个chain有若干rules 每个chain有个默认缺省的rule，称作policy，用-P表示 &#160; filter 过滤封包 INPUT 进入本机的封包 OUTPUT 从本机出去的封包 FORWARD 经过本机路由转送的封包 &#160; nat 转译ip位置 PREROUTING 路由前 所有来的封包 OUTPUT 从本机出去的封包 POSTROUTING 路由后 所有出去的封包 &#160; mangle 改变封包内容 PREROUTING 路由前 所有来的封包 OUTPUT 从本机出去的封包 &#160; 下面这个图说明了封包经过这几个tables和chains的流程 下面介绍了rule的几种target &#160; 分别为 DROP 直接丢弃 ACCEPT 允许 REJECT 退回错误信息并丢弃 LOG 记录，不处理 &#160; chain的管理 -A 在chain末尾append若干条rule -D 在chain中delete若干条rule -I [...]]]></description>
		<wfw:commentRss>http://loneblog.com/blog/iptables-netfilter.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux 编译新的驱动模块到内核</title>
		<link>http://loneblog.com/blog/linux-how-to-add-mod.html</link>
		<comments>http://loneblog.com/blog/linux-how-to-add-mod.html#comments</comments>
		<pubDate>Tue, 25 Jan 2011 02:50:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[modprobe.conf]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://loneblog.com/blog/linux-how-to-add-mod.html</guid>
		<description><![CDATA[这篇挺水的，老鸟略过吧 一、用命令自动添加模块 这个很简答，分为三步。 1.查看模块是否已经存在当前内核中 这里以ipip.ko这个模块为例，一般都没有被编译进去 #lsmod &#124; grep ipip 如果没有的话，查看本地lib中是否有这个模块 #modprobe –l &#124; grep ipip /lib/modules/2.6.18-194.el5/kernel/net/ipv4/ipip.ko 或者手动查看/lib/modules/$(unmae -r)/kernel/ &#160; 2.使用mkinitrd新建内核 #mkinitrd &#8211;with=ipip /boot/initrd-2.6.18-194.ido.img $(uname -r) 3.修改grub.conf添加新启动项 root (hd0,0) kernel /vmlinuz-2.6.18-194.el5 ro root=LABEL=/ rhgb quiet initrd /initrd-2.6.18-194.ido.img 二、手工添加模块，编译initrd 手动添加比较繁琐，大概分为3大步 1.解压initrd文件 #cp /boot/initrd-2.6.18-194.el5.img /tmp # file /tmp/initrd-2.6.18-194.el5.img /tmp/initrd-2.6.18-194.el5.img: gzip compressed data, from Unix, last modified: Sun Jan [...]]]></description>
		<wfw:commentRss>http://loneblog.com/blog/linux-how-to-add-mod.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>让RedHat使用CentOS yum源</title>
		<link>http://loneblog.com/blog/redhat-use-centos-yum-repo.html</link>
		<comments>http://loneblog.com/blog/redhat-use-centos-yum-repo.html#comments</comments>
		<pubDate>Sun, 23 Jan 2011 13:42:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://loneblog.com/blog/redhat-use-centos-yum-repo.html</guid>
		<description><![CDATA[由于正版的红帽需要RHN等注册才能使用yum服务源，因此对于我们这些实验用机很不柔道的说。因此我们要使用免费的centos做源！ 方法是网上看来得，不过说实话对于版本兼容性问题，冷博客在这里还是打个问号的 不过一般实验用没问题，系统都是同根而生的呀 网上流传着南京啥啥大学ftp源，冷博客觉得这个不好，大学ftp说变就变，而且十有八九是教育网的速度不会很快，不如用163的。 这里特别谢谢163能提供国内知名的一个免费开源镜像！ 方法如下： [root@loneblog ~]# vim /etc/yum.repos.d/centos.repo 新建一个repo，填入如下内容，其实后几项没有必要，更新的时候特费时，把base 和 upate 填上就行！ [base] name=CentOS-5-163-Base baseurl=http://mirrors.163.com/centos/5.5/os/i386/ gpgcheck=0 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5 [update] name=CentOS-5-Updates baseurl=http://mirrors.163.com/centos/5.5/os/i386/ gpgcheck=0 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5 [addons] name=CentOS-5-Addons baseurl=http://mirrors.163.com/centos/5.5/os/i386/ gpgcheck=0 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5 [extras] name=CentOS-5-Extras baseurl=http://mirrors.163.com/centos/5.5/os/i386/ gpgcheck=0 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5 [centosplus] name=CentOS-5-Plus baseurl=http://mirrors.163.com/centos/5.5/os/i386/ gpgcheck=0 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5 enabled=0 #contrib &#8211; packages by Centos Users [contrib] name=CentOS-5-Contrib baseurl=http://mirrors.163.com/centos/5.5/os/i386/ gpgcheck=0 gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-5 [dag] name=Dag RPM Repository [...]]]></description>
		<wfw:commentRss>http://loneblog.com/blog/redhat-use-centos-yum-repo.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Grub开机启动故障排查大全</title>
		<link>http://loneblog.com/blog/linux-grub-error.html</link>
		<comments>http://loneblog.com/blog/linux-grub-error.html#comments</comments>
		<pubDate>Sun, 23 Jan 2011 12:17:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://loneblog.com/blog/linux-grub-error.html</guid>
		<description><![CDATA[来源：http://servershuji.blog.51cto.com/1283121/340779 这个是原创滴，非常实用，特转之。 原文标题如下，冷博客觉得还是叫做 开机启动故障 比较好。 &#160; RHEL服务器故障排除精粹 大家好！我是书记。今天给大家打来的是Linux服务器中常见故障的一些解决方案。 首先，我们要知道对Linux进行故障排错的学习方法和步骤： 一、要非常熟悉Linux的启动过程。 二、要学会查看日志的好习惯。 三、要具备常见的Linux故障的场景及解决方法的经验。 四、不断的积累、总结。 引导流程图： （1）修复MBR扇区故障 故障原因： &#160;&#160;&#160;&#160;&#160;&#160;&#160; One：一些病毒、木马等造成的破坏。 &#160;&#160;&#160;&#160;&#160;&#160;&#160; two：不正确的分区操作、磁盘读写的误操作。 故障现象： &#160;&#160;&#160;&#160;&#160;&#160;&#160; one :无法加载OS，开机后出现黑屏。 &#160;&#160;&#160;&#160;&#160;&#160;&#160; two：找不到引导程序，启动过程中突然中断。 解决方案： &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; one:应提前作好备份文件 &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; two:以RHEL5安装光盘引导进入急救模式 &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; three:从备份文件中恢复 Example： 1.备份MBR扇区数据 &#160;&#160;&#160; dd if=/dev/sda of =/backup/sda.mbr.bak bs=512 count=1 2.模拟MBR被破坏额故障 &#160;&#160;&#160; dd if=/dev/sda of=/dev/sda bs=512 count=1 3.RHEL5关盘引导，进入到急救模式 &#160;&#160;&#160;&#160; boot:linux resure 4.从备份文件中恢复MBR扇区 &#160;&#160;&#160;&#160; [...]]]></description>
		<wfw:commentRss>http://loneblog.com/blog/linux-grub-error.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can&#8217;t locate RRDs.pm in @INC 类似问题的解决</title>
		<link>http://loneblog.com/blog/cant-locate-rrds-pm.html</link>
		<comments>http://loneblog.com/blog/cant-locate-rrds-pm.html#comments</comments>
		<pubDate>Fri, 21 Jan 2011 13:32:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://loneblog.com/blog/cant-locate-rrds-pm.html</guid>
		<description><![CDATA[上篇文章说了关于smokeping的安装，他是基于perl语言的。 其实使用perl加上模块跑的软件，如果没处理好其中任何一个环节，都会报错，而且让你根本不知道哪里出的错。 冷博客在安装smokeping的时候就报错，差点儿重做系统。 首先，一个通用的检测perl+RRDs的方法 perl -MRRDs -le &#8216;print q(ok!)&#8217; 如果显示ok!就证明你的perl+MRRDs工作正常 报错的话，两种已知错误。 Can&#8217;t locate RRDs.pm in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi ln -sv /usr/local/rrdtool/lib/perl/5.8.5/i386-linux-thread-multi/RRDs.pm \ /usr/lib/perl5/5.8.5/i386-linux-thread-multi/ Can&#8217;t locate loadable object for module RRDs in @INC (@INC contains: /usr/lib/perl5/5.8.5/i386-linux-thread-multi ln -sv /usr/local/rrdtool/lib/perl/5.8.5/i386-linux-thread-multi/auto/RRDs/RRDs.so \ /usr/lib/perl5/5.8.5/i386-linux-thread-multi/]]></description>
		<wfw:commentRss>http://loneblog.com/blog/cant-locate-rrds-pm.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>smokeping安装配置超详细流程</title>
		<link>http://loneblog.com/blog/how-to-configure-smokeping.html</link>
		<comments>http://loneblog.com/blog/how-to-configure-smokeping.html#comments</comments>
		<pubDate>Fri, 21 Jan 2011 12:50:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[smokeping]]></category>

		<guid isPermaLink="false">http://loneblog.com/blog/how-to-configure-smokeping.html</guid>
		<description><![CDATA[来自how2centos的教程，非常详细，原帖找不到了。 使用RH或者CentOS的朋友完全可以直接复制命令。 为了方面大家直接复制命令，冷博客把原文重新排版，把一些#号去掉了 :) 而且这套方法经过冷博客在真机实验的，现在还在运行。 我们在下一篇要谈谈关于perl报错的问题。 开始了~ Installing Smokeping on CentOS 5.5 yum update rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm 安装httpd yum install httpd ‍ 安装探针 yum install rrdtool yum install fping yum install echoping yum install curl yum install perl perl-Net-Telnet perl-Net-DNS perl-LDAP perl-libwww-perl perl-RadiusPerl perl-IO-Socket-SSL perl-Socket6 perl-CGI-SpeedyCGI wget http://oss.oetiker.ch/smokeping/pub/smokeping-2.4.1.tar.gz tar zxvf smokeping-2.4.1.tar.gz mv smokeping-2.4.1 /opt/smokeping cd [...]]]></description>
		<wfw:commentRss>http://loneblog.com/blog/how-to-configure-smokeping.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>老生重弹：LVM配置详解</title>
		<link>http://loneblog.com/blog/lvm.html</link>
		<comments>http://loneblog.com/blog/lvm.html#comments</comments>
		<pubDate>Wed, 19 Jan 2011 08:40:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[rhce]]></category>
		<category><![CDATA[rhel]]></category>

		<guid isPermaLink="false">http://loneblog.com/blog/%e8%80%81%e7%94%9f%e9%87%8d%e5%bc%b9%ef%bc%9alvm%e9%85%8d%e7%bd%ae%e8%af%a6%e8%a7%a3.html</guid>
		<description><![CDATA[上次说了关于LVM的一些原理和命令，见：LVM配置命令笔记。这次做个比较全面的说明。 LVM的基础知识和分区的基础知识这篇不涉及。以下实验均为在VM上的RHEL5.5原始命令。 LVM有三层结构：PV VG 和 LV &#160; 一、准备工作 #fdisk –l /dev/sda6&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 727&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 739&#160;&#160;&#160;&#160;&#160; 104391&#160;&#160; 83&#160; Linux /dev/sda7&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 740&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 752&#160;&#160;&#160;&#160;&#160; 104391&#160;&#160; 83&#160; Linux /dev/sda8&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 753&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 765&#160;&#160;&#160;&#160;&#160; 104391&#160;&#160; 83&#160; Linux /dev/sda9&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 766&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 778&#160;&#160;&#160;&#160;&#160; 104391&#160;&#160; 83&#160; Linux 二、PV操作 &#160; 1.创建pv盘 [root@rhce ~]# pvcreate /dev/sda{6,7,8} &#160; Physical volume &#34;/dev/sda6&#34; successfully created &#160; Physical volume &#34;/dev/sda7&#34; successfully created &#160; Physical [...]]]></description>
		<wfw:commentRss>http://loneblog.com/blog/lvm.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dhcp和ip helper-address命令工作过程</title>
		<link>http://loneblog.com/blog/dhcp-and-ip-helper-address.html</link>
		<comments>http://loneblog.com/blog/dhcp-and-ip-helper-address.html#comments</comments>
		<pubDate>Thu, 13 Jan 2011 07:05:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[网络相关]]></category>
		<category><![CDATA[cisco]]></category>
		<category><![CDATA[dhcp]]></category>

		<guid isPermaLink="false">http://loneblog.com/blog/dhcp-and-ip-helper-address.html</guid>
		<description><![CDATA[百年一遇的好文章：http://www.jakee.cn/index.php/archives/576.html 不得不承认，技术宅拯救世界！ 讨论了几个主要问题： dhcp工作原理 dhcp分配多套IP地址方法 dhcp跨交换机路由器分配地址 ip helper-address命令工作原理 &#160; &#160; 1典型配置命令 Router1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#interface Ethernet0 Router1(config-if)#ip helper-address 172.25.1.1 /*指定dhcp服务器的地址，表示通过Ethernet0向该服务器发送DHCP请求包*/ Router1(config-if)#ip helper-address 172.25.10.7 /*作用同上*/ Router1(config-if)#end Router1# 关于以上配置的讨论 1 在客户端设备和DHCP服务器不再同一广播域内的时候，中间设备即路有器（路有功能的设备）必须要能够转发这种广播包，具体到cisco的设备上，则启用ip helper-address命令，来实现这种中继。 2 DHCP服务器要给终端设备分配地址则需要掌握两个重要的信息，第一，该客户端设备所在网络的子网掩码，DHCP服务器依据子网掩码的信息来判断，服务器该分配哪个IP地址，以使得该ip地址在那个子网内，第二，DHCP服务器必须知道客户端的MAC地址，以维护DHCP服务器的ip 地址和MAC之间的映射关系，由此保证同样一台客户机，每次启动后能获得和前一次相同的ip地址。 3 配置了ip helper-address命令之后的路由器在中继DHCP请求时的工作过程如下: a,DHCP客户端发送请求，由于没有ip地址，所以自己的源IP地址为0.0.0.0，而且也不知道目的DHCP服务器的地址，所以为广播255.255.255.255。该数据报中当然还包含其他信息，比如二层的信息，源mac地址，和目的mac地址FFFFFFFFFFFF。 b，当路由器接收到该数据报的时候，他就用自己的接口地址（接收到数据报的接口）来取代源地址0.0.0.0，并且用ip help-address 命令中指定的地址（上例中为172.25.1.1以及172.25.10.7）来取代目的地址255.255.255.255 c 当DHCP服务器接收到路有器转发过来的DHCP请求包时，他有了足够的信息，（由源IP地址中的地址，确定客户机所在的子网掩马，由此分配相应地址池中的空闲地址，并且知道了客户记得MAC地址，把它写入自己的数据库，建立IP地址和MAC的映射关系）然后DHCP服务器做出响应，并且由路有器把数据报转发会客户端。（整个过程应该在客户机和服务器之间还有一次会话，由于这不是路由器DHCP配置的讨论重点，这里不谈） 4 例子中配置了两个DHCP服务器，我们必须分别用ip helper-address 命令指明，路有器会转发DHCP请求包到所有的DHCP服务器上。很多企业的做法都是至少有两台DHCP服务器，有提高冗余和可靠性的作用。此时，如果客户端受到几个来自不同DHCP服务器的应答，则只选择最先接收到的应答数据报。 5 [...]]]></description>
		<wfw:commentRss>http://loneblog.com/blog/dhcp-and-ip-helper-address.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

