﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-Chan Chen Coding...-文章分类-Network</title><link>http://www.blogjava.net/czihong/category/50892.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 04 Dec 2012 20:39:52 GMT</lastBuildDate><pubDate>Tue, 04 Dec 2012 20:39:52 GMT</pubDate><ttl>60</ttl><item><title>各种远程通信协议分析、比较</title><link>http://www.blogjava.net/czihong/articles/392411.html</link><dc:creator>Chan Chen</dc:creator><author>Chan Chen</author><pubDate>Tue, 04 Dec 2012 06:06:00 GMT</pubDate><guid>http://www.blogjava.net/czihong/articles/392411.html</guid><wfw:comment>http://www.blogjava.net/czihong/comments/392411.html</wfw:comment><comments>http://www.blogjava.net/czihong/articles/392411.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/czihong/comments/commentRss/392411.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/czihong/services/trackbacks/392411.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: Refer To：http://ihyperwin.iteye.com/blog/1627794在分布式服务框架中，一个最基础的问题就是远程服务是怎么通讯的，在Java领域中有很多可实现远程通讯的技术，例如：RMI、MINA、ESB、Burlap、Hessian、SOAP、EJB和JMS等，这些名词之间到底是些什么关系呢，它们背后到底是基于什么原理实现的呢，了解这些是实现分布式服务框架的基础知识，...&nbsp;&nbsp;<a href='http://www.blogjava.net/czihong/articles/392411.html'>阅读全文</a><img src ="http://www.blogjava.net/czihong/aggbug/392411.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/czihong/" target="_blank">Chan Chen</a> 2012-12-04 14:06 <a href="http://www.blogjava.net/czihong/articles/392411.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Dos Attack</title><link>http://www.blogjava.net/czihong/articles/379260.html</link><dc:creator>Chan Chen</dc:creator><author>Chan Chen</author><pubDate>Fri, 25 May 2012 18:44:00 GMT</pubDate><guid>http://www.blogjava.net/czihong/articles/379260.html</guid><wfw:comment>http://www.blogjava.net/czihong/comments/379260.html</wfw:comment><comments>http://www.blogjava.net/czihong/articles/379260.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/czihong/comments/commentRss/379260.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/czihong/services/trackbacks/379260.html</trackback:ping><description><![CDATA[<p><span style="font-size:11.5pt;font-family:SimSun;">什么是</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> </span><span style="font-size:11.5pt;font-family:SimSun;">那么，</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt; font-family:SimSun;">到底是什么？接触</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">PC</span><span style="font-size:11.5pt;font-family:SimSun;">机较早的同志会直接想到微软磁盘操作系统</span>&nbsp;<span style="font-size:11.5pt;font-family:SimSun;">的</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">DOS--Disk&nbsp;Operation&nbsp;System</span><span style="font-size:11.5pt;font-family:SimSun;">？哦，不不不，我看盖茨可不像是黑客的老大哟！此</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family: SimSun;">非彼</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DOS</span><span style="font-size:11.5pt;font-family:SimSun;">也，</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">即</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">Denial&nbsp;Of&nbsp;Service</span><span style="font-size:11.5pt;font-family:SimSun;">，拒绝服务的缩写。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">是指故意的攻击网络协议实现的缺陷或直接通过野蛮手段残忍地耗尽被攻击对象的资源，目的是让目标计算机或网络无法提供正常的服务或资源访问，使目标系统服务系统停止响应甚至崩溃，而在此攻击中并不包括侵入目标服务器或目标网络设备。这些服务资源包括网络带宽，文件系统空间容量，开放的进程或者允许的连接。这种攻击会导致资源的匮乏，无论计算机的处理速度多快、内存容量多大、网络带宽的速度多快都无法避免这种攻击带来的后果。要知道任何事物都有一个极限，所以总能找到一个方法使请求的值大于该极限值，因此就会故意导致所提供的服务资源匮乏，表面上好象是服务资源无法满足需求。所以千万不要自认为拥有了足够宽的带宽和足够快的服务器就有了一个不怕</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击的高性能网站，拒绝服务攻击会使所有的资源变得非常渺小。</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> </span><span style="font-size:11.5pt;font-family:SimSun;">其实，我们作个形象的比喻来理解</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt; font-family:SimSun;">。街头的餐馆是为大众提供餐饮服务，如果一群地痞流氓要</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">餐馆的话，手段会很多，比如霸占着餐桌不结账，堵住餐馆的大门不让路，骚扰餐馆的服务员或厨子不能干活，甚至更恶劣</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&#8230;&#8230;</span><span style="font-size:11.5pt;font-family:SimSun;">相应的计算机和网络系统则是为</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Internet&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">用户提供互联网资源的，如果有黑客要进行</span><span style="font-size: 11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size: 11.5pt;font-family:SimSun;">攻击的话，可以想象同样有好多手段！今天最常见的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击有对计算机网络的带宽攻击和连通性攻击。带宽攻击指以极大的通信量冲击网络，使得所有可用网络资源都被消耗殆尽，最后导致合法的用户请求无法通过。连通性攻击指用大量的连接请求冲击计算机，使得所有可用的操作系统资源都被消耗殆尽，最终计算机无法再处理合法用户的请求。</span>&nbsp;<span style="font-size:11.5pt;font-family:SimSun;">什么是</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DDoS&nbsp; <br /> <br /> </span><span style="font-size:11.5pt;font-family:SimSun;">传统上，攻击者所面临的主要问题是网络带宽，由于较小的网络规模和较慢的网络速度的限制，攻击者无法发出过多的请求。虽然类似</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"the&nbsp;ping&nbsp;of&nbsp;death"</span><span style="font-size:11.5pt;font-family:SimSun;">的攻击类型只需要较少量的包就可以摧毁一个没有打过补丁的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">UNIX</span><span style="font-size:11.5pt;font-family:SimSun;">系统，但大多数的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击还是需要相当大的带宽的，而以个人为单位的黑客们很难使用高带宽的资源。为了克服这个缺点，</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击者开发了分布式的攻击。攻击者简单利用工具集合许多的网络带宽来同时对同一个目标发动大量的攻击请求，这就是</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DDoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> DDoS</span><span style="font-size:11.5pt;font-family:SimSun;">（</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Distributed&nbsp;Denial&nbsp;Of&nbsp;Service</span><span style="font-size:11.5pt;font-family:SimSun;">）又把</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt; font-family:SimSun;">又向前发展了一大步，这种分布式拒绝服务攻击是黑客利用在已经侵入并已控制的不同的高带宽主机（可能是数百，甚至成千上万台）上安装大量的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">服务程序，它们等待来自中央攻击控制中心的命令，中央攻击控制中心在适时启动全体受控主机的</span><span style="font-size: 11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size: 11.5pt;font-family:SimSun;">服务进程，让它们对一个特定目标发送尽可能多的网络访问请求，形成一股</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">洪流冲击目标系统，猛烈的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击同一个网站。在寡不敌众的力量抗衡下，被攻击的目标网站会很快失去反应而不能及时处理正常的访问甚至系统瘫痪崩溃。可见</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DDoS</span><span style="font-size:11.5pt;font-family:SimSun;">与</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">的最大区别是人多力量大。</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt; font-family:SimSun;">是一台机器攻击目标，</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DDoS</span><span style="font-size:11.5pt;font-family:SimSun;">是被中央攻击中心控制的很多台机器利用他们的高带宽攻击目标，可更容易地将目标网站攻下。另外，</span><span style="font-size: 11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DDoS</span><span style="font-size: 11.5pt;font-family:SimSun;">攻击方式较为自动化，攻击者可以把他的程序安装到网络中的多台机器上，所采用的这种攻击方式很难被攻击对象察觉，直到攻击者发下统一的攻击命令，这些机器才同时发起进攻。可以说</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DDoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击是由黑客集中控制发动的一组</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击的集合，现在这种方式被认为是最有效的攻击形式，并且非常难以抵挡。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> </span><span style="font-size:11.5pt;font-family:SimSun;">无论是</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt; font-family:SimSun;">攻击还是</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DDoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击，简单的看，都只是一种破坏网络服务的黑客方式，虽然具体的实现方式千变万化，但都有一个共同点，就是其根本目的是使受害主机或网络无法及时接收并处理外界请求，或无法及时回应外界请求。其具体表现方式有以下几种：</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> 1</span><span style="font-size:11.5pt;font-family:SimSun;">．制造大流量无用数据，造成通往被攻击主机的网络拥塞，使被攻击主机无法正常和外界通信。</span></p>  <p><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">2</span><span style="font-size:11.5pt;font-family:SimSun;">．利用被攻击主机提供服务或传输协议上处理重复连接的缺陷，反复高频的发出攻击性的重复服务请求，使被攻击主机无法及时处理其它正常的请求。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> 3</span><span style="font-size:11.5pt;font-family:SimSun;">．利用被攻击主机所提供服务程序或传输协议的本身实现缺陷，反复发送畸形的攻击数据引发系统错误的分配大量系统资源，使主机处于挂起状态甚至死机。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> <br /> </span><span style="font-size:11.5pt;font-family:SimSun;">常见的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt; font-family:SimSun;">攻击</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> <br /> </span><span style="font-size:11.5pt;font-family:SimSun;">拒绝服务攻击是一种对网络危害巨大的恶意攻击。今天，</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">具有代表性的攻击手段包括</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Ping&nbsp;of&nbsp;Death</span><span style="font-size:11.5pt;font-family:SimSun;">、</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">TearDrop</span><span style="font-size:11.5pt; font-family:SimSun;">、</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">UDP&nbsp;flood&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">、</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">SYN&nbsp;flood</span><span style="font-size:11.5pt; font-family:SimSun;">、</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Land&nbsp;Attack</span><span style="font-size:11.5pt;font-family:SimSun;">、</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">IP&nbsp;Spoofing&nbsp;DoS</span><span style="font-size:11.5pt;font-family:SimSun;">等。我们看看它们又是怎么实现的。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> <br /> </span><span style="font-size:11.5pt;font-family:SimSun;">死亡之</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;ping&nbsp;(&nbsp;ping&nbsp;of&nbsp;death&nbsp;)&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">：</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">ICMP&nbsp;(Internet&nbsp;Control&nbsp;Message&nbsp;Protocol</span><span style="font-size:11.5pt;font-family:SimSun;">，</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">Internet</span><span style="font-size:11.5pt; font-family:SimSun;">控制信息协议</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">)</span><span style="font-size:11.5pt;font-family:SimSun;">在</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Internet</span><span style="font-size:11.5pt;font-family:SimSun;">上用于错误处理和传递控制信息。它的功能之一是与主机联系，通过发送一个</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt;font-family:SimSun;">回音请求</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt; font-family:SimSun;">（</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">echo&nbsp;request</span><span style="font-size:11.5pt;font-family:SimSun;">）信息包看看主机是否</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt; font-family:SimSun;">活着</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt;font-family:SimSun;">。最普通的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">ping</span><span style="font-size:11.5pt; font-family:SimSun;">程序就是这个功能。而在</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TCP/IP</span><span style="font-size:11.5pt;font-family:SimSun;">的</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">RFC</span><span style="font-size:11.5pt;font-family: SimSun;">文档中对包的最大尺寸都有严格限制规定，许多操作系统的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TCP/IP</span><span style="font-size:11.5pt;font-family:SimSun;">协议栈都规定</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">ICMP&nbsp;</span><span style="font-size: 11.5pt;font-family:SimSun;">包大小为</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">64KB</span><span style="font-size:11.5pt;font-family:SimSun;">，且在对包的标题头进行读取之后，要根据该标题头里包含的信息来为有效载荷生成缓冲区。</span><span style="font-size: 11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"Ping&nbsp;of&nbsp;Death"&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">就是故意产生畸形的测试</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Ping</span><span style="font-size:11.5pt; font-family:SimSun;">（</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Packet&nbsp;Internet&nbsp;Groper</span><span style="font-size:11.5pt;font-family:SimSun;">）包，声称自己的尺寸超过</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;ICMP&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">上限，也就是加载的尺寸超过</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;64KB</span><span style="font-size:11.5pt;font-family:SimSun;">上限，使未采取保护措施的网络系统出现内存分配错误，导致</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;TCP/IP&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">协议栈崩溃，最终接收方荡机。</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> <br /> </span><span style="font-size:11.5pt;font-family:SimSun;">泪滴</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">(&nbsp;teardrop&nbsp;)&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">：泪滴攻击利用在</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;TCP/IP&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">协议栈实现中信任</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">IP&nbsp;</span><span style="font-size: 11.5pt;font-family:SimSun;">碎片中的包的标题头所包含的信息来实现自己的攻击。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">IP&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">分段含有指示该分段所包含的是原包的哪一段的信息，某些</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;TCP/IP</span><span style="font-size:11.5pt;font-family:SimSun;">协议栈（例如</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">NT&nbsp;</span><span style="font-size: 11.5pt;font-family:SimSun;">在</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">service&nbsp;pack&nbsp;4&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">以前）在收到含有重叠偏移的伪造分段时将崩溃。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;UDP&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">洪水</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;(UDP&nbsp;flood)&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">：如今在</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Internet</span><span style="font-size:11.5pt;font-family:SimSun;">上</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">UDP</span><span style="font-size:11.5pt;font-family: SimSun;">（用户数据包协议）的应用比较广泛，很多提供</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">WWW</span><span style="font-size:11.5pt;font-family:SimSun;">和</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Mail</span><span style="font-size:11.5pt;font-family:SimSun;">等服务设备通常是使用</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Unix</span><span style="font-size:11.5pt; font-family:SimSun;">的服务器，它们默认打开一些被黑客恶意利用的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">UDP</span><span style="font-size:11.5pt;font-family:SimSun;">服务。如</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">echo</span><span style="font-size:11.5pt;font-family:SimSun;">服务会显示接收到的每一个数据包，而原本作为测试功能的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">chargen</span><span style="font-size:11.5pt;font-family:SimSun;">服务会在收到每一个数据包时随机反馈一些字符。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">UDP&nbsp;flood</span><span style="font-size:11.5pt;font-family:SimSun;">假冒攻击就是利用这两个简单的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;TCP/IP&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">服务的漏洞进行恶意攻击，通过伪造与某一主机的</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;Chargen&nbsp;</span><span style="font-size:11.5pt; font-family:SimSun;">服务之间的一次的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;UDP&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">连接，回复地址指向开着</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Echo&nbsp;</span><span style="font-size: 11.5pt;font-family:SimSun;">服务的一台主机，通过将</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Chargen&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">和</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;Echo</span><span style="font-size:11.5pt; font-family:SimSun;">服务互指，来回传送毫无用处且占满带宽的垃圾数据，在两台主机之间生成足够多的无用数据流，这一拒绝服务攻击飞快地导致网络可用带宽耗尽。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;SYN&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">洪水</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;(&nbsp;SYN&nbsp;flood&nbsp;)&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">：我们知道当用户进行一次标准的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TCP</span><span style="font-size:11.5pt;font-family:SimSun;">（</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">Transmission&nbsp;Control&nbsp;Protocol</span><span style="font-size:11.5pt;font-family:SimSun;">）连接时，会有一个</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">3</span><span style="font-size:11.5pt;font-family:SimSun;">次握手过程。首先是请求服务方发送一个</span><span style="font-size: 11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">SYN</span><span style="font-size: 11.5pt;font-family:SimSun;">（</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Synchronize&nbsp;Sequence&nbsp;Number</span><span style="font-size:11.5pt;font-family:SimSun;">）消息，服务方收到</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">SYN</span><span style="font-size:11.5pt; font-family:SimSun;">后，会向请求方回送一个</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">SYN-ACK</span><span style="font-size:11.5pt;font-family:SimSun;">表示确认，当请求方收到</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">SYN-ACK</span><span style="font-size:11.5pt; font-family:SimSun;">后，再次向服务方发送一个</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">ACK</span><span style="font-size:11.5pt;font-family:SimSun;">消息，这样一次</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TCP</span><span style="font-size:11.5pt;font-family:SimSun;">连接建立成功。</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"SYN&nbsp;Flooding"</span><span style="font-size:11.5pt;font-family:SimSun;">则专门针对</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TCP</span><span style="font-size:11.5pt;font-family:SimSun;">协议栈在两台主机间初始化连接握手的过程进行</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击，其在实现过程中只进行前</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">2</span><span style="font-size:11.5pt;font-family:SimSun;">个步骤：当服务方收到请求方的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">SYN-ACK</span><span style="font-size:11.5pt; font-family:SimSun;">确认消息后，请求方由于采用源地址欺骗等手段使得服务方收不到</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">ACK</span><span style="font-size:11.5pt;font-family:SimSun;">回应，于是服务方会在一定时间处于等待接收请求方</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">ACK</span><span style="font-size:11.5pt;font-family: SimSun;">消息的状态。而对于某台服务器来说，可用的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TCP</span><span style="font-size:11.5pt;font-family:SimSun;">连接是有限的，因为他们只有有限的内存缓冲区用于创建连接，如果这一缓冲区充满了虚假连接的初始信息，该服务器就会对接下来的连接停止响应，直至缓冲区里的连接企图超时。如果恶意攻击方快速连续地发送此类连接请求，该服务器可用的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TCP</span><span style="font-size:11.5pt;font-family:SimSun;">连接队列将很快被阻塞，系统可用资源急剧减少，网络可用带宽迅速缩小，长此下去，除了少数幸运用户的请求可以插在大量虚假请求间得到应答外，服务器将无法向用户提供正常的合法服务。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> <br /> Land&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">（</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Land&nbsp;Attack</span><span style="font-size:11.5pt;font-family:SimSun;">）攻击：在</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;Land&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">攻击中，黑客利用一个特别打造的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">SYN&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">包</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">--</span><span style="font-size:11.5pt;font-family: SimSun;">它的原地址和目标地址都被设置成某一个服务器地址进行攻击。此举将导致接受服务器向它自己的地址发送</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;SYN-ACK&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">消息，结果这个地址又发回</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;ACK&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">消息并创建一个空连接，每一个这样的连接都将保留直到超时，在</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;Land&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">攻击下，许多</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;UNIX</span><span style="font-size:11.5pt;font-family:SimSun;">将崩溃，</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">NT&nbsp;</span><span style="font-size: 11.5pt;font-family:SimSun;">变得极其缓慢（大约持续五分钟）。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> IP</span><span style="font-size:11.5pt;font-family:SimSun;">欺骗</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DOS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击：这种攻击利用</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TCP</span><span style="font-size:11.5pt;font-family:SimSun;">协议栈的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">RST</span><span style="font-size:11.5pt; font-family:SimSun;">位来实现，使用</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">IP</span><span style="font-size:11.5pt;font-family:SimSun;">欺骗，迫使服务器把合法用户的连接复位，影响合法用户的连接。假设现在有一个合法用户</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">(100.100.100.100)</span><span style="font-size:11.5pt;font-family:SimSun;">已经同服务器建立了正常的连接，攻击者构造攻击的</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">TCP</span><span style="font-size:11.5pt;font-family: SimSun;">数据，伪装自己的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">IP</span><span style="font-size:11.5pt;font-family:SimSun;">为</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">100.100.100.100</span><span style="font-size:11.5pt;font-family:SimSun;">，并向服务器发送一个带有</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">RST</span><span style="font-size:11.5pt; font-family:SimSun;">位的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TCP</span><span style="font-size:11.5pt;font-family:SimSun;">数据段。服务器接收到这样的数据后，认为从</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">100.100.100.100</span><span style="font-size:11.5pt;font-family:SimSun;">发送的连接有错误，就会清空缓冲区中已建立好的连接。这时，合法用户</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">100.100.100.100</span><span style="font-size:11.5pt;font-family:SimSun;">再发送合法数据，服务器就已经没有这样的连接了，该用户就被拒绝服务而只能重新开始建立新的连接。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> <br /> </span><span style="font-size:11.5pt;font-family:SimSun;">常见的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DDoS</span><span style="font-size:11.5pt; font-family:SimSun;">攻击</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> <br /> smurf</span><span style="font-size:11.5pt;font-family:SimSun;">、</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Fraggle&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">攻击、</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Trinoo</span><span style="font-size:11.5pt; font-family:SimSun;">、</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Tribe&nbsp;Flood&nbsp;Network(TFN)</span><span style="font-size:11.5pt;font-family:SimSun;">、</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">TFN2k</span><span style="font-size:11.5pt;font-family: SimSun;">以及</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Stacheldraht</span><span style="font-size:11.5pt;font-family:SimSun;">是比较常见的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DDoS</span><span style="font-size:11.5pt; font-family:SimSun;">攻击程序，我们再看看它们的原理，其攻击思路基本相近。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;Smurf&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">攻击：</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Smurf</span><span style="font-size:11.5pt; font-family:SimSun;">是一种简单但有效的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;DDoS&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">攻击技术，</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Smurf</span><span style="font-size:11.5pt; font-family:SimSun;">还是利用</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">ping</span><span style="font-size:11.5pt;font-family:SimSun;">程序进行源</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">IP</span><span style="font-size:11.5pt;font-family:SimSun;">假冒的直接广播进行攻击。在</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Internet</span><span style="font-size: 11.5pt;font-family:SimSun;">上广播信息可以通过一定的手段（通过广播地址或其他机制）发送到整个网络中的机器。当某台机器使用广播地址发送一个</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">ICMP&nbsp;echo</span><span style="font-size:11.5pt;font-family:SimSun;">请求包时（例如</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Ping</span><span style="font-size:11.5pt; font-family:SimSun;">），一些系统会回应一个</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">ICMP&nbsp;echo</span><span style="font-size:11.5pt;font-family:SimSun;">回应包，这样发送一个包会收到许多的响应包。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Smurf</span><span style="font-size:11.5pt;font-family:SimSun;">攻击就是使用这个原理来进行的，同时它还需要一个假冒的源地址。也就是说</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Smurf</span><span style="font-size:11.5pt; font-family:SimSun;">在网络中发送的源地址为要攻击的主机地址，目的地址为广播地址的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">ICMP&nbsp;echo</span><span style="font-size:11.5pt;font-family:SimSun;">请求包，使许多的系统同时响应并发送大量的信息给被攻击主机（因为他的地址被攻击者假冒了）。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Smurf</span><span style="font-size:11.5pt;font-family:SimSun;">是用一个伪造的源地址连续</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">ping</span><span style="font-size:11.5pt;font-family:SimSun;">一个或多个计算机网络，这就导致所有计算机响应的那个主机地址并不是实际发送这个信息包的攻击计算机。这个伪造的源地址，实际上就是攻击的目标，它将被极大数量的响应信息量所淹没。对这个伪造信息包做出响应的计算机网络就成为攻击的不知情的同谋。一个简单的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;smurf&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">攻击最终导致网络阻塞和第三方崩溃，这种攻击方式要比</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;ping&nbsp;of&nbsp;death&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">洪水的流量高出一两个数量级。这种使用网络发送一个包而引出大量回应的方式也被叫做</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Smurf"</span><span style="font-size:11.5pt;font-family:SimSun;">放大</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt;font-family: SimSun;">。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> <br /> Fraggle&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">攻击：</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Fraggle&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">攻击对</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;Smurf&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">攻击作了简单的修改，使用的是</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;UDP&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">应答消息而非</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;ICMP</span><span style="font-size: 11.5pt;font-family:SimSun;">。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> <br /> "trinoo"</span><span style="font-size:11.5pt;font-family: SimSun;">攻击：</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">trinoo&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">是复杂的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;DDoS&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">攻击程序，是基于</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">UDP&nbsp;flood</span><span style="font-size:11.5pt;font-family:SimSun;">的攻击软件。它使用</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"master"</span><span style="font-size:11.5pt;font-family:SimSun;">程序对实际实施攻击的任何数量的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt;font-family:SimSun;">代理</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt;font-family: SimSun;">程序实现自动控制。当然在攻击之前，侵入者为了安装软件，已经控制了装有</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">master</span><span style="font-size:11.5pt;font-family:SimSun;">程序的计算机和所有装有代理程序的计算机。攻击者连接到安装了</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">master</span><span style="font-size:11.5pt;font-family:SimSun;">程序的计算机，启动</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">master</span><span style="font-size:11.5pt; font-family:SimSun;">程序，然后根据一个</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">IP</span><span style="font-size:11.5pt;font-family:SimSun;">地址的列表，由</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">master</span><span style="font-size:11.5pt;font-family:SimSun;">程序负责启动所有的代理程序。接着，代理程序用</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">UDP&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">信息包冲击网络，向被攻击目标主机的随机端口发出全零的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">4</span><span style="font-size:11.5pt;font-family:SimSun;">字节</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">UDP</span><span style="font-size:11.5pt;font-family:SimSun;">包，在处理这些超出其处理能力垃圾数据包的过程中，被攻击主机的网络性能不断下降，直到不能提供正常服务，乃至崩溃。它对</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">IP</span><span style="font-size:11.5pt;font-family:SimSun;">地址不做假，因此此攻击方法用得不多。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> <br /> "Tribal&nbsp;Flood&nbsp;Network"</span><span style="font-size:11.5pt;font-family:SimSun;">和</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp;"TFN2K"&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">攻击：</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Tribe&nbsp;Flood&nbsp;Network</span><span style="font-size:11.5pt;font-family:SimSun;">与</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">trinoo</span><span style="font-size:11.5pt;font-family:SimSun;">一样，使用一个</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">master</span><span style="font-size:11.5pt; font-family:SimSun;">程序与位于多个网络上的攻击代理进行通讯，利用</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">ICMP</span><span style="font-size:11.5pt;font-family:SimSun;">给代理服务器下命令，其来源可以做假。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TFN</span><span style="font-size:11.5pt;font-family:SimSun;">可以并行发动数不胜数的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt; font-family:SimSun;">攻击，类型多种多样，而且还可建立带有伪装源</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">IP</span><span style="font-size:11.5pt;font-family:SimSun;">地址的信息包。</span>&nbsp;<span style="font-size:11.5pt;font-family:SimSun;">可以由</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TFN</span><span style="font-size:11.5pt; font-family:SimSun;">发动的攻击包括：</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">SYN&nbsp;flood</span><span style="font-size:11.5pt;font-family:SimSun;">、</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">UDP&nbsp;flood</span><span style="font-size:11.5pt; font-family:SimSun;">、</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">ICMP</span><span style="font-size:11.5pt;font-family:SimSun;">回音请求</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">flood</span><span style="font-size:11.5pt;font-family:SimSun;">及</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">Smurf</span><span style="font-size:11.5pt;font-family: SimSun;">（利用多台服务器发出海量数据包，实施</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击）等攻击。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TFN</span><span style="font-size:11.5pt;font-family:SimSun;">的升级版</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TFN2k</span><span style="font-size:11.5pt; font-family:SimSun;">进一步对命令数据包加密，更难查询命令内容，命令来源可以做假，还有一个后门控制代理服务器。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> <br /> "stacheldraht"</span><span style="font-size:11.5pt; font-family:SimSun;">攻击：</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Stacheldraht</span><span style="font-size:11.5pt;font-family:SimSun;">也是基于</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TFN</span><span style="font-size:11.5pt; font-family:SimSun;">和</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">trinoo</span><span style="font-size:11.5pt;font-family:SimSun;">一样的客户机</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">/</span><span style="font-size:11.5pt; font-family:SimSun;">服务器模式，其中</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Master</span><span style="font-size:11.5pt;font-family:SimSun;">程序与潜在的成千个代理程序进行通讯。在发动攻击时，侵入者与</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">master</span><span style="font-size:11.5pt;font-family:SimSun;">程序进行连接。</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Stacheldraht</span><span style="font-size: 11.5pt;font-family:SimSun;">增加了新的功能：攻击者与</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">master</span><span style="font-size:11.5pt;font-family:SimSun;">程序之间的通讯是加密的，对命令来源做假，而且可以防范一些路由器用</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">RFC2267</span><span style="font-size:11.5pt;font-family:SimSun;">过滤，若检查出有过滤现象，它将只做假</span><span style="font-size: 11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">IP</span><span style="font-size: 11.5pt;font-family:SimSun;">地址最后</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">8</span><span style="font-size:11.5pt;font-family:SimSun;">位，从而让用户无法了解到底是哪几个网段的哪台机器被攻击；同时使用</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">rcp&nbsp;(remote&nbsp;copy</span><span style="font-size:11.5pt;font-family:SimSun;">，远程复制</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">)</span><span style="font-size:11.5pt;font-family:SimSun;">技术对代理程序进行自动更新。</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Stacheldraht&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">同</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TFN</span><span style="font-size:11.5pt;font-family:SimSun;">一样，可以并行发动数不胜数的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt; font-family:SimSun;">攻击，类型多种多样，而且还可建立带有伪装源</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">IP</span><span style="font-size:11.5pt;font-family:SimSun;">地址的信息包。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Stacheldraht</span><span style="font-size:11.5pt;font-family:SimSun;">所发动的攻击包括</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">UDP&nbsp;</span><span style="font-size: 11.5pt;font-family:SimSun;">冲击、</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">TCP&nbsp;SYN&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">冲击、</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">ICMP&nbsp;</span><span style="font-size: 11.5pt;font-family:SimSun;">回音应答冲击。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> </span><span style="font-size:11.5pt;font-family:SimSun;">如何防止</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS/DdoS</span><span style="font-size: 11.5pt;font-family:SimSun;">攻击</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> <br /> DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击几乎是从互联网络的诞生以来，就伴随着互联网络的发展而一直存在也不断发展和升级。值得一提的是，要找</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">的工具一点不难，黑客群居的网络社区都有共享黑客软件的传统，并会在一起交流攻击的心得经验，你可以很轻松的从</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Internet</span><span style="font-size:11.5pt;font-family:SimSun;">上获得这些工具，像以上提到的这些</span><span style="font-size: 11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size: 11.5pt;font-family:SimSun;">攻击软件都是可以从网上随意找到的公开软件。所以任何一个上网者都可能构成网络安全的潜在威胁。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击给飞速发展的互联网络安全带来重大的威胁。然而从某种程度上可以说，</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt; font-family:SimSun;">攻击永远不会消失而且从技术上目前没有根本的解决办法。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> </span><span style="font-size:11.5pt;font-family:SimSun;">面对凶多吉少的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt; font-family:SimSun;">险滩，我们该如何对付随时出现的黑客攻击呢？让我们首先对造成</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击威胁的技术问题做一下总结。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击可以说是如下原因造成的：</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> 1</span><span style="font-size:11.5pt;font-family:SimSun;">．软件弱点是包含在操作系统或应用程序中与安全相关的系统缺陷，这些缺陷大多是由于错误的程序编制，粗心的源代码审核，无心的副效应或一些不适当的绑定所造成的。由于使用的软件几乎完全依赖于开发商，所以对于由软件引起的漏洞只能依</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">*</span><span style="font-size:11.5pt;font-family:SimSun;">打补丁，安装</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">hot&nbsp;fixes</span><span style="font-size:11.5pt;font-family:SimSun;">和</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">Service&nbsp;packs</span><span style="font-size:11.5pt; font-family:SimSun;">来弥补。当某个应用程序被发现有漏洞存在，开发商会立即发布一个更新的版本来修正这个漏洞。由于开发协议固有的缺陷导致的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击，可以通过简单的补丁来弥补系统缺陷。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> 2</span><span style="font-size:11.5pt;font-family:SimSun;">．错误配置也会成为系统的安全隐患。这些错误配置通常发生在硬件装置，系统或者应用程序中，大多是由于一些没经验的，无责任员工或者错误的理论所导致的。如果对网络中的路由器，防火墙，交换机以及其他网络连接设备都进行正确的配置会减小这些错误发生的可能性。如果发现了这种漏洞应当请教专业的技术人员来修理这些问题。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> 3</span><span style="font-size:11.5pt;font-family:SimSun;">．重复请求导致过载的拒绝服务攻击。当对资源的重复请求大大超过资源的支付能力时就会造成拒绝服务攻击（例如，对已经满载的</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Web</span><span style="font-size:11.5pt;font-family:SimSun;">服务器进行过多的请求使其过载）。</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> </span><span style="font-size:11.5pt;font-family:SimSun;">要避免系统免受</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt; font-family:SimSun;">攻击，从前两点来看，网络管理员要积极谨慎地维护系统，确保无安全隐患和漏洞；而针对第三点的恶意攻击方式则需要安装防火墙等安全设备过滤</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">DoS</span><span style="font-size:11.5pt;font-family:SimSun;">攻击，同时强烈建议网络管理员应当定期查看安全设备的日志，及时发现对系统的安全威胁行为。</span><span style="font-size: 11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">&nbsp; <br /> 3Com</span><span style="font-size:11.5pt;font-family:SimSun;">公司是一个全面的企业网络解决方案提供商，旨在为企业用户提供</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt;font-family:SimSun;">丰富、简单、灵活、可</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">*</span><span style="font-size:11.5pt; font-family:SimSun;">而高性能价格比</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt;font-family:SimSun;">的网络解决方案。</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Internet</span><span style="font-size: 11.5pt;font-family:SimSun;">支持工具就是其中的主要解决方案之一，包括</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">SuperStack&nbsp;3&nbsp;Firewall</span><span style="font-size:11.5pt;font-family:SimSun;">、</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">Web&nbsp;Cache</span><span style="font-size:11.5pt; font-family:SimSun;">以及</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Server&nbsp;Load&nbsp;Balancer</span><span style="font-size:11.5pt;font-family:SimSun;">。不但作为安全网关设备的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">3Com&nbsp;SuperStack&nbsp;3&nbsp;</span><span style="font-size:11.5pt;font-family:SimSun;">防火墙在缺省预配置下可探测和防止</span><span style="font-size: 11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt;font-family:SimSun;">拒绝服务</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"(DoS)</span><span style="font-size:11.5pt;font-family:SimSun;">以及</span><span style="font-size:11.5pt;font-family: &quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt;font-family: SimSun;">分布式拒绝服务</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"(DDoS)</span><span style="font-size:11.5pt;font-family:SimSun;">等黑客侵袭，强有力的保护您的网络，使您免遭未经授权访问和其他来自</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">Internet</span><span style="font-size:11.5pt;font-family:SimSun;">的外部威胁和侵袭；而且</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">3Com&nbsp;SuperStack&nbsp;3&nbsp;Server&nbsp;Load&nbsp;Balancer</span><span style="font-size:11.5pt;font-family:SimSun;">在为多服务器提供硬件线速的</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">4-7</span><span style="font-size:11.5pt; font-family:SimSun;">层负载均衡的同时，还能保护所有服务器免受</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt;font-family:SimSun;">拒绝服务</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"(DoS)</span><span style="font-size: 11.5pt;font-family:SimSun;">攻击；同样</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">3Com&nbsp;SuperStack&nbsp;3&nbsp;Web&nbsp;Cache</span><span style="font-size:11.5pt;font-family:SimSun;">在为企业提供高效的本地缓存的同时，也能保证自身免受</span><span style="font-size:11.5pt;font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"</span><span style="font-size:11.5pt;font-family:SimSun;">拒绝服务</span><span style="font-size:11.5pt; font-family:&quot;ˎ̥&quot;,&quot;serif&quot;">"(DoS)</span><span style="font-size: 11.5pt;font-family:SimSun;">攻击</span></p><img src ="http://www.blogjava.net/czihong/aggbug/379260.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/czihong/" target="_blank">Chan Chen</a> 2012-05-26 02:44 <a href="http://www.blogjava.net/czihong/articles/379260.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Gateway</title><link>http://www.blogjava.net/czihong/articles/378896.html</link><dc:creator>Chan Chen</dc:creator><author>Chan Chen</author><pubDate>Wed, 23 May 2012 00:43:00 GMT</pubDate><guid>http://www.blogjava.net/czihong/articles/378896.html</guid><wfw:comment>http://www.blogjava.net/czihong/comments/378896.html</wfw:comment><comments>http://www.blogjava.net/czihong/articles/378896.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/czihong/comments/commentRss/378896.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/czihong/services/trackbacks/378896.html</trackback:ping><description><![CDATA[<p style="margin: 0.4em 0px 0.5em; background-color: #ffffff;">
<div><span style="line-height: 19px;">In computer networking, a gateway is a node (a router) on a TCP/IP network that serves as an access point to another network. A default gateway is the node on the computer network that the network software uses when an IP address does not match any other routes in the routing table.</span></div>
<div><span style="line-height: 19px;">In home computing configurations, an ISP often provides a physical device which both connects local hardware to the Internet and serves as a gateway. Such devices include DSL modems and cable modems.</span></div>
<div><span style="line-height: 19px;">In organizational systems a gateway is a node that routes the traffic from a workstation to another network segment. The default gateway commonly connects the internal networks and the outside network (Internet). In such a situation, the gateway node could also act as a proxy server and a firewall. The gateway is also associated with both a router, which uses headers and forwarding tables to determine where packets are sent, and a switch, which provides the actual path for the packet in and out of the gateway.</span></div>
<div><span style="line-height: 19px;">In other words, a default gateway provides an entry point and an exit point in a network.</span></div>
<div><span style="line-height: 19px;">Contents</span></div>
<div><span style="line-height: 19px;"><br />
</span></div>
<div><span style="line-height: 19px;">&nbsp; [hide]&nbsp;</span></div>
<div><span style="line-height: 19px;">1 Example1</span></div>
<div><span style="line-height: 19px;">2 Example2</span></div>
<div><span style="line-height: 19px;">3 See also</span></div>
<div><span style="line-height: 19px;">4 External links</span></div>
<div><span style="line-height: 19px;">[edit]Example1</span></div>
<div><span style="line-height: 19px;"><br />
</span></div>
<div><span style="line-height: 19px;">An office network consists of six hosts and a router is given as:</span></div>
<div><span style="line-height: 19px;">Hosts addresses:</span></div>
<div><span style="line-height: 19px;">192.168.4.3</span></div>
<div><span style="line-height: 19px;">192.168.4.4</span></div>
<div><span style="line-height: 19px;">192.168.4.5</span></div>
<div><span style="line-height: 19px;">192.168.4.6</span></div>
<div><span style="line-height: 19px;">192.168.4.7</span></div>
<div><span style="line-height: 19px;">192.168.4.8</span></div>
<div><span style="line-height: 19px;">Router (this side) address:</span></div>
<div><span style="line-height: 19px;">192.168.4.1</span></div>
<div><span style="line-height: 19px;">The network has a subnet mask of:</span></div>
<div><span style="line-height: 19px;">255.255.255.0 (/24 in CIDR notation)</span></div>
<div><span style="line-height: 19px;">Thus the usable network ranges from addresses 192.168.4.1 to 192.168.4.254. (TCP/IP defines the addresses 192.168.4.0 and 192.168.4.255 for special functions.)</span></div>
<div><span style="line-height: 19px;">The office's hosts will send packets addressed to IPs within this range directly, by resolving the destination IP address into a MAC address through an ARP sequence (if not already known through the host's ARP cache) and then enveloping the IP packet into a layer 2 (MAC) packet addressed to the destination host.</span></div>
<div><span style="line-height: 19px;">Packets addressed outside of this range (for this example, a packet addressed to 192.168.12.3) cannot travel directly to the destination. Instead they must be sent to the default gateway for further routing to their ultimate destination. In this example, the default gateway uses the IP address 192.168.4.1, which is resolved into a MAC address with ARP in the usual way. Note that the destination IP address remains 192.168.12.3, but the next-hop physical address is that of the gateway, rather than of the ultimate destination.</span></div>
<div><span style="line-height: 19px;">[edit]Example2</span></div>
<div><span style="line-height: 19px;"><br />
</span></div>
<div><span style="line-height: 19px;">A network with three routers and three hosts, connected to the Internet through router1.</span></div>
<div><span style="line-height: 19px;">Hosts and addresses:</span></div>
<div><span style="line-height: 19px;">PC1 10.1.1.100, default gateway 10.1.1.1</span></div>
<div><span style="line-height: 19px;">PC2 172.16.1.100, default gateway 172.16.1.1</span></div>
<div><span style="line-height: 19px;">PC3 192.168.1.100, default gateway 192.168.1.96</span></div>
<div><span style="line-height: 19px;">Router1:</span></div>
<div><span style="line-height: 19px;">Interface 1 5.5.5.2 (public IP)</span></div>
<div><span style="line-height: 19px;">Interface 2 10.1.1.1</span></div>
<div><span style="line-height: 19px;">Router2:</span></div>
<div><span style="line-height: 19px;">Interface 1 10.1.1.2</span></div>
<div><span style="line-height: 19px;">Interface 2 172.16.1.1</span></div>
<div><span style="line-height: 19px;">Router3:</span></div>
<div><span style="line-height: 19px;">Interface 1 10.1.1.3</span></div>
<div><span style="line-height: 19px;">Interface 2 192.168.1.96</span></div>
<div><span style="line-height: 19px;">Network mask in all networks: 255.255.255.0 (/24 in CIDR notation).</span></div>
<div><span style="line-height: 19px;">If the routers do not use a Routing Information Protocol to discover which network each router is connected to, then the routing table of each router must be set up.</span></div>
<div><span style="line-height: 19px;">Router1</span></div>
<div><span style="line-height: 19px;">Network ID<span style="white-space:pre">	</span>Network mask<span style="white-space:pre">	</span>Gateway<span style="white-space:pre">	</span>Interface (examples; may vary)<span style="white-space:pre">	</span>Cost (decreases the TTL)</span></div>
<div><span style="line-height: 19px;">0.0.0.0 (default route)<span style="white-space:pre">	</span>0.0.0.0<span style="white-space:pre">	</span>Assigned by ISP (e.g. 5.5.5.1)<span style="white-space:pre">	</span>eth0 (Ethernet 1st adapter)<span style="white-space:pre">	</span>10</span></div>
<div><span style="line-height: 19px;">10.1.1.0<span style="white-space:pre">	</span>255.255.255.0<span style="white-space:pre">	</span>10.1.1.1<span style="white-space:pre">	</span>eth1 (Ethernet 2nd adapter)<span style="white-space:pre">	</span>10</span></div>
<div><span style="line-height: 19px;">172.16.1.0<span style="white-space:pre">	</span>255.255.255.0<span style="white-space:pre">	</span>10.1.1.2<span style="white-space:pre">	</span>eth1 (Ethernet 2nd adapter)<span style="white-space:pre">	</span>10</span></div>
<div><span style="line-height: 19px;">192.168.1.0<span style="white-space:pre">	</span>255.255.255.0<span style="white-space:pre">	</span>10.1.1.3<span style="white-space:pre">	</span>eth1 (Ethernet 2nd adapter)<span style="white-space:pre">	</span>10</span></div>
<div><span style="line-height: 19px;"><br />
</span></div>
<div><span style="line-height: 19px;">Router2</span></div>
<div><span style="line-height: 19px;">Network ID<span style="white-space:pre">	</span>Network mask<span style="white-space:pre">	</span>Gateway<span style="white-space:pre">	</span>Interface (examples; may vary)<span style="white-space:pre">	</span>Cost (decreases the TTL)</span></div>
<div><span style="line-height: 19px;">0.0.0.0 (default route)<span style="white-space:pre">	</span>0.0.0.0<span style="white-space:pre">	</span>10.1.1.1<span style="white-space:pre">	</span>eth0 (Ethernet 1st adapter)<span style="white-space:pre">	</span>10</span></div>
<div><span style="line-height: 19px;">172.16.1.0<span style="white-space:pre">	</span>255.255.255.0<span style="white-space:pre">	</span>172.16.1.1<span style="white-space:pre">	</span>eth1 (Ethernet 2nd adapter)<span style="white-space:pre">	</span>10</span></div>
<div><span style="line-height: 19px;">Router3</span></div>
<div><span style="line-height: 19px;">Network ID<span style="white-space:pre">	</span>Network mask<span style="white-space:pre">	</span>Gateway<span style="white-space:pre">	</span>Interface (examples; may vary)<span style="white-space:pre">	</span>Cost (decreases the TTL)</span></div>
<div><span style="line-height: 19px;">0.0.0.0 (default route)<span style="white-space:pre">	</span>0.0.0.0<span style="white-space:pre">	</span>10.1.1.1<span style="white-space:pre">	</span>eth0 (Ethernet 1st adapter)<span style="white-space:pre">	</span>10</span></div>
<div><span style="line-height: 19px;">192.168.1.0<span style="white-space:pre">	</span>255.255.255.0<span style="white-space:pre">	</span>192.168.1.96<span style="white-space:pre">	</span>eth1 (Ethernet 2nd adapter)<span style="white-space:pre">	</span>10</span></div>
<div><span style="line-height: 19px;">Router2 manages its attached networks and default gateway; router 3 does the same; router 1 manages all routes within the internal networks.</span></div>
<div><span style="line-height: 19px;">Accessing internal resources If PC2 (172.16.1.100) needs to access PC3 (192.168.1.100), since PC2 has no route to 192.168.1.100 it will send packets for PC3 to its default gateway (router2). Router2 also has no route to PC3, and it will forward the packets to its default gateway (router1). Router1 has a route for this network (192.168.1.0/24) so router1 will forward the packets to router3, which will deliver the packets to PC3; reply packets will follow the same route to PC2.</span></div>
<div><span style="line-height: 19px;">Accessing external resources If any of the computers try to access a webpage on the Internet, like http://en.wikipedia.org/, the destination will first be resolved to an IP address by using DNS-resolving. The IP-address could be 91.198.174.2. In this example, none of the internal routers know the route to that host, so they will forward the packet through router1's gateway or default route. Every router on the packet's way to the destination will check whether the packet's destination IP-address matches any known network routes. If a router finds a match, it will forward the packet through that route; if not, it will send the packet to its own default gateway. Each router encountered on the way will store the packet ID and where it came from so that it can pass the request back to previous sender. The packet contains source and destination, not all router hops. At last the packet will arrive back to router1, which will check for matching packet ID and route it accordingly through router2 or router3 or directly to PC1 (which was connected in the same network segment as router1).</span></div>
<div><span style="line-height: 19px;">The packet doesn't return If router1 routing table does not have any route to 192.168.1.0/24, and PC3 tries to access a resource outside its own network, then the outgoing routing will work until the reply is fed back to router1. Since the route is unknown to router1, it will go to router1's default gateway, and never reach router3. In the logs of the resource they will trace the request, but the requestor will never get any information. The packet will die because the TTL-value decrease to less than 1 when it is travelling through the routers or the router will see that it has a private IP and discard it. This could be discovered by using Microsoft Windows utility Pathping, since you only can ping until that router which has no route or wrong route. (Note that some routers will not reply to pinging.)</span></div>
</p>
<img src ="http://www.blogjava.net/czihong/aggbug/378896.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/czihong/" target="_blank">Chan Chen</a> 2012-05-23 08:43 <a href="http://www.blogjava.net/czihong/articles/378896.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>DHCP Overview</title><link>http://www.blogjava.net/czihong/articles/377752.html</link><dc:creator>Chan Chen</dc:creator><author>Chan Chen</author><pubDate>Wed, 09 May 2012 18:09:00 GMT</pubDate><guid>http://www.blogjava.net/czihong/articles/377752.html</guid><wfw:comment>http://www.blogjava.net/czihong/comments/377752.html</wfw:comment><comments>http://www.blogjava.net/czihong/articles/377752.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/czihong/comments/commentRss/377752.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/czihong/services/trackbacks/377752.html</trackback:ping><description><![CDATA[<div>Technical overview</div><div></div><div>Dynamic Host Configuration Protocol automates network-parameter assignment to network devices from one or more DHCP servers. Even in small networks, DHCP is useful because it makes it easy to add new machines to the network.</div><div>When a DHCP-configured client (a computer or any other network-aware device) connects to a network, the DHCP client sends a broadcast query requesting necessary information from a DHCP server. The DHCP server manages a pool of IP addresses and information about client configuration parameters such as default gateway, domain name, the name servers, other servers such as time servers, and so forth. On receiving a valid request, the server assigns the computer an IP address, a lease (length of time the allocation is valid), and other IP configuration parameters, such as the subnet mask and the default gateway. The query is typically initiated immediately after booting, and must complete before the client can initiate IP-based communication with other hosts. Upon disconnecting, the IP address is returned to the pool for use by another computer. This way, many other computers can use the same IP address within minutes of each other.</div><div>Depending on implementation, the DHCP server may have three methods of allocating IP-addresses:</div><div>dynamic allocation: A network administrator assigns a range of IP addresses to DHCP, and each client computer on the LAN is configured to request an IP address from the DHCP server during network initialization. The request-and-grant process uses a lease concept with a controllable time period, allowing the DHCP server to reclaim (and then reallocate) IP addresses that are not renewed.</div><div>automatic allocation: The DHCP server permanently assigns a free IP address to a requesting client from the range defined by the administrator. This is like dynamic allocation, but the DHCP server keeps a table of past IP address assignments, so that it can preferentially assign to a client the same IP address that the client previously had.</div><div>static allocation: The DHCP server allocates an IP address based on a table with MAC address/IP address pairs, which are manually filled in (perhaps by a network administrator). [Only requesting clients with a MAC address listed in this table will be allocated an IP address]. This feature (which is not supported by all DHCP servers) is variously called Static DHCP Assignment (by DD-WRT), fixed-address (by the dhcpd documentation), Address Reservation (by Netgear), DHCP reservation or Static DHCP (byCisco/Linksys), and IP reservation or MAC/IP binding (by various other router manufacturers).</div><div>[edit]Technical details</div><div></div><div>DHCP uses the same two ports assigned by IANA for BOOTP: destination UDP port 67 for sending data to the server, and UDP port 68 for data to the client. DHCP communications are connectionless in nature.</div><div>DHCP operations fall into four basic phases: IP discovery, IP lease offer, IP request, and IP lease acknowledgement. These points are often abbreviated as DORA (Discovery, Offer, Request, Acknowledgement).</div><div>DHCP clients and servers on the same subnet communicate via UDP broadcasts, initially. If the client and server are on different subnets, a DHCP Helper or DHCP Relay Agentmay be used. Clients requesting renewal of an existing lease may communicate directly via UDP unicast, since the client already has an established IP address at that point.</div><div>[edit]DHCP discovery</div><div></div><div>The client broadcasts messages on the physical subnet to discover available DHCP servers. Network administrators can configure a local router to forward DHCP packets to a DHCP server from a different subnet. This client-implementation creates a User Datagram Protocol (UDP) packet with the broadcast destination of 255.255.255.255 or the specific subnet broadcast address.</div><div>A DHCP client can also request its last-known IP address (in the example below, 192.168.1.100). If the client remains connected to a network for which this IP is valid, the server may grant the request. Otherwise, it depends whether the server is set up as authoritative or not. An authoritative server will deny the request, making the client ask for a new IP address immediately. A non-authoritative server simply ignores the request, leading to an implementation-dependent timeout for the client to give up on the request and ask for a new IP address.</div><div>DHCPDISCOVER</div><div>UDP Src=0.0.0.0 sPort=68</div><div>Dest=255.255.255.255 dPort=67</div><div>OP<span style="white-space:pre">	</span>HTYPE<span style="white-space:pre">	</span>HLEN<span style="white-space:pre">	</span>HOPS</div><div>0x01<span style="white-space:pre">	</span>0x01<span style="white-space:pre">	</span>0x06<span style="white-space:pre">	</span>0x00</div><div>XID</div><div>0x3903F326</div><div>SECS<span style="white-space:pre">	</span>FLAGS</div><div>0x0000<span style="white-space:pre">	</span>0x0000</div><div>CIADDR (Client IP Address)</div><div>0x00000000</div><div>YIADDR (Your IP Address)</div><div>0x00000000</div><div>SIADDR (Server IP Address)</div><div>0x00000000</div><div>GIADDR (Gateway IP Address)</div><div>0x00000000</div><div>CHADDR (Client Hardware Address)</div><div>0x00053C04</div><div>0x8D590000</div><div>0x00000000</div><div>0x00000000</div><div>192 octets of 0s, or overflow space for additional options. BOOTP legacy</div><div>Magic Cookie</div><div>0x63825363</div><div>DHCP Options</div><div>DHCP option 53: DHCP Discover</div><div>DHCP option 50: 192.168.1.100 requested</div><div>DHCP option 55: Parameter Request List:</div><div>Request Subnet Mask (1), Router (3), Domain Name (15),</div><div>Domain Name Server (6)</div><div>[edit]DHCP offer</div><div></div><div>When a DHCP server receives an IP lease request from a client, it reserves an IP address for the client and extends an IP lease offer by sending a DHCPOFFER message to the client. This message contains the client's MAC address, the IP address that the server is offering, the subnet mask, the lease duration, and the IP address of the DHCP server making the offer.</div><div>The server determines the configuration based on the client's hardware address as specified in the CHADDR (Client Hardware Address) field. Here the server, 192.168.1.1, specifies the IP address in the YIADDR (Your IP Address) field.</div><div>DHCPOFFER</div><div>UDP Src=192.168.1.1 sPort=67</div><div>Dest=255.255.255.255 dPort=68</div><div>OP<span style="white-space:pre">	</span>HTYPE<span style="white-space:pre">	</span>HLEN<span style="white-space:pre">	</span>HOPS</div><div>0x02<span style="white-space:pre">	</span>0x01<span style="white-space:pre">	</span>0x06<span style="white-space:pre">	</span>0x00</div><div>0x00000000</div><div>YIADDR (Your IP Address)</div><div>0xC0A80164</div><div>SIADDR (Server IP Address)</div><div>0xC0A80101</div><div>GIADDR (Gateway IP Address)</div><div>0x00000000</div><div>CHADDR (Client Hardware Address)</div><div>0x00053C04</div><div>0x8D590000</div><div>0x00000000</div><div>0x00000000</div><div>192 octets of 0s. BOOTP legacy</div><div>Magic Cookie</div><div>0x63825363</div><div>DHCP Options</div><div>DHCP option 53: DHCP Offer</div><div>DHCP option 1: 255.255.255.0 subnet mask</div><div>DHCP option 3: 192.168.1.1 router</div><div>DHCP option 51: 86400s (1 day) IP lease time</div><div>DHCP option 54: 192.168.1.1 DHCP server</div><div>DHCP option 6: DNS servers 9.7.10.15, 9.7.10.16, 9.7.10.18</div><div>[edit]DHCP request</div><div></div><div>In response to the offer Client requests the server. The client replies DHCPRequest, unicast to the server, requesting the offered address. A client can receive DHCP offers from multiple servers, but it will accept only one DHCP offer. Based on the Transaction ID field in the request, servers are informed whose offer the client has accepted. When other DHCP servers receive this message, they withdraw any offers that they might have made to the client and return the offered address to the pool of available addresses. In some cases DHCP request message is broadcast, instead of being unicast to a particular DHCP server, because the DHCP client has still not received an IP address. Also, this way one message can let all other DHCP servers know that another server will be supplying the IP address without missing any of the servers with a series of unicast messages.</div><div>Read more: http://wiki.answers.com/Q/What_is_Dora_process_in_DHCP_and_how_it_works#ixzz1ljWKjqeA</div><div>DHCPREQUEST</div><div>UDP Src=0.0.0.0 sPort=68</div><div>Dest=255.255.255.255 dPort=67</div><div>OP<span style="white-space:pre">	</span>HTYPE<span style="white-space:pre">	</span>HLEN<span style="white-space:pre">	</span>HOPS</div><div>0x01<span style="white-space:pre">	</span>0x01<span style="white-space:pre">	</span>0x06<span style="white-space:pre">	</span>0x00</div><div>XID</div><div>0x3903F326</div><div>SECS<span style="white-space:pre">	</span>FLAGS</div><div>0x0000<span style="white-space:pre">	</span>0x0000</div><div>CIADDR (Client IP Address)</div><div>0x00000000</div><div>YIADDR (Your IP Address)</div><div>0x00000000</div><div>SIADDR (Server IP Address)</div><div>0xC0A80101</div><div>GIADDR (Gateway IP Address)</div><div>0x00000000</div><div>CHADDR (Client Hardware Address)</div><div>0x00053C04</div><div>0x8D590000</div><div>0x00000000</div><div>0x00000000</div><div>192 octets of 0s. BOOTP legacy</div><div>Magic Cookie</div><div>0x63825363</div><div>DHCP Options</div><div>DHCP option 53: DHCP Request</div><div>DHCP option 50: 192.168.1.100 requested</div><div>DHCP option 54: 192.168.1.1 DHCP server.</div><div>[edit]DHCP acknowledgement</div><div></div><div>When the DHCP server receives the DHCPREQUEST message from the client, the configuration process enters its final phase. The acknowledgement phase involves sending a DHCPACK packet to the client. This packet includes the lease duration and any other configuration information that the client might have requested. At this point, the IP configuration process is completed.</div><div>The protocol expects the DHCP client to configure its network interface with the negotiated parameters.</div><div>DHCPACK</div><div>UDP Src=192.168.1.1 sPort=67</div><div>Dest=255.255.255.255 dPort=68</div><div>OP<span style="white-space:pre">	</span>HTYPE<span style="white-space:pre">	</span>HLEN<span style="white-space:pre">	</span>HOPS</div><div>0x02<span style="white-space:pre">	</span>0x01<span style="white-space:pre">	</span>0x06<span style="white-space:pre">	</span>0x00</div><div>XID</div><div>0x3903F326</div><div>SECS<span style="white-space:pre">	</span>FLAGS</div><div>0x0000<span style="white-space:pre">	</span>0x0000</div><div>CIADDR (Client IP Address)</div><div>0x00000000</div><div>YIADDR (Your IP Address)</div><div>0xC0A80164</div><div>SIADDR (Server IP Address)</div><div>0xC0A80101</div><div>GIADDR (Gateway IP Address switched by relay)</div><div>0x00000000</div><div>CHADDR (Client Hardware Address)</div><div>0x00053C04</div><div>0x8D590000</div><div>0x00000000</div><div>0x00000000</div><div>192 octets of 0s. BOOTP legacy</div><div>Magic Cookie</div><div>0x63825363</div><div>DHCP Options</div><div>DHCP option 53: DHCP ACK</div><div>DHCP option 1: 255.255.255.0 subnet mask</div><div>DHCP option 3: 192.168.1.1 router</div><div>DHCP option 51: 86400s (1 day) IP lease time</div><div>DHCP option 54: 192.168.1.1 DHCP server</div><div>DHCP option 6: DNS servers 9.7.10.15, 9.7.10.16, 9.7.10.18</div><div>After the client obtains an IP address, the client may use the Address Resolution Protocol (ARP) to prevent IP conflicts caused by overlapping address pools of DHCP servers.</div><div>[edit]DHCP information</div><div></div><div>A DHCP client may request more information than the server sent with the original DHCPOFFER. The client may also request repeat data for a particular application. For example, browsers use DHCP Inform to obtain web proxy settings via WPAD. Such queries do not cause the DHCP server to refresh the IP expiry time in its database.</div><div>[edit]DHCP releasing</div><div></div><div>The client sends a request to the DHCP server to release the DHCP information and the client deactivates its IP address. As client devices usually do not know when users may unplug them from the network, the protocol does not mandate the sending of DHCP Release.</div><div>[edit]Client configuration parameters in DHCP</div><div></div><div>A DHCP server can provide optional configuration parameters to the client. RFC 2132 describes the available DHCP options defined by Internet Assigned Numbers Authority(IANA) - DHCP and BOOTP PARAMETERS.</div><div>A DHCP client can select, manipulate and overwrite parameters provided by a DHCP server.[3]</div><div>[edit]Options</div><div></div><div>An option exists to identify the vendor and functionality of a DHCP client. The information is a variable-length string of characters or octets which has a meaning specified by the vendor of the DHCP client. One method that a DHCP client can utilize to communicate to the server that it is using a certain type of hardware or firmware is to set a value in its DHCP requests called the Vendor Class Identifier (VCI) (Option 60). This method allows a DHCP server to differentiate between the two kinds of client machines and process the requests from the two types of modems appropriately. Some types of set-top boxes also set the VCI (Option 60) to inform the DHCP server about the hardware type and functionality of the device. The value that this option is set to give the DHCP server a hint about any required extra information that this client needs in a DHCP response.</div><div>[edit]DHCP Relaying</div><div></div><div>In small networks, where only one IP subnet is being managed, DHCP clients communicate directly with DHCP servers. However, DHCP servers can also provide IP addresses for multiple subnets. In this case, a DHCP client that has not yet acquired an IP address cannot communicate directly with the DHCP server using IP routing, because it doesn't have a routable IP address, nor does it know the IP address of a router. In order to allow DHCP clients on subnets not directly served by DHCP servers to communicate with DHCP servers, DHCP relay agents can be installed on these subnets. The DHCP client broadcasts on the local link; the relay agent receives the broadcast and transmits it to one or more DHCP servers using unicast. The relay agent stores its own IP address in the GIADDR field of the DHCP packet. The DHCP server uses the GIADDR to determine the subnet on which the relay agent received the broadcast, and allocates an IP address on that subnet. When the DHCP server replies to the client, it sends the reply to the GIADDR address, again using unicast. The relay agent then retransmits the response on the local network.</div><div>[edit]Reliability</div><div></div><div>The DHCP protocol provides reliability in several ways: periodic renewal, rebinding, and failover. DHCP clients are allocated leases that last for some period of time. Clients begin to attempt to renew their leases once half the lease interval has expired. They do this by sending a unicast DHCPREQUEST message to the DHCP server that granted the original lease. If that server is down or unreachable, it will fail to respond to the DHCPREQUEST. However, the DHCPREQUEST will be repeated by the client from time to time,[specify] so when the DHCP server comes back up or becomes reachable again, the DHCP client will succeed in contacting it, and renew its lease.</div><div>If the DHCP server is unreachable for an extended period of time,[specify] the DHCP client will attempt to rebind, by broadcasting its DHCPREQUEST rather than unicasting it. Because it is broadcast, the DHCPREQUEST message will reach all available DHCP servers. If some other DHCP server is able to renew the lease, it will do so at this time.</div><div>In order for rebinding to work, when the client successfully contacts a backup DHCP server, that server must have accurate information about the client's binding. Maintaining accurate binding information between two servers is a complicated problem; if both servers are able to update the same lease database, there must be a mechanism to avoid conflicts between updates on the independent servers. A standard for implementing fault-tolerant DHCP servers was developed at the Internet Engineering Task Force.[4][note 1]</div><div>If rebinding fails, the lease will eventually expire. When the lease expires, the client must stop using the IP address granted to it in its lease. At that time, it will restart the DHCP process from the beginning by broadcasting a DHCPDISCOVER message. Since its lease has expired, it will accept any IP address offered to it. Once it has a new IP address, presumably from a different DHCP server, it will once again be able to use the network. However, since its IP address has changed, any ongoing connections will be broken.</div><div>[edit]Security</div><div></div><div>The base DHCP protocol does not include any mechanism for authentication.[5] Because of this, it is vulnerable to a variety of attacks. These attacks fall into three main categories:</div><div>Unauthorized DHCP servers providing false information to clients.[6]</div><div>Unauthorized clients gaining access to resources.[6]</div><div>Resource exhaustion attacks from malicious DHCP clients.[6]</div><div>Because the client has no way to validate the identity of a DHCP server, unauthorized DHCP servers can be operated on networks, providing incorrect information to DHCP clients. This can serve either as a denial-of-service attack, preventing the client from gaining access to network connectivity[citation needed], or as a man-in-the-middle attack. Because the DHCP server provides the DHCP client with server IP addresses, such as the IP address of one or more DNS servers,[6] an attacker can convince a DHCP client to do its DNS lookups through its own DNS server, and can therefore provide its own answers to DNS queries from the client.[7] This in turn allows the attacker to redirect network traffic through itself, allowing it to eavesdrop on connections between the client and network servers it contacts, or to simply replace those network servers with its own.[7]</div><div>Because the DHCP server has no secure mechanism for authenticating the client, clients can gain unauthorized access to IP addresses by presenting credentials, such as client identifiers, that belong to other DHCP clients.[citation needed] This also allows DHCP clients to exhaust the DHCP server's store of IP addresses&#8212;by presenting new credentials each time it asks for an address, the client can consume all the available IP addresses on a particular network link, preventing other DHCP clients from getting service.[citation needed]</div><div>DHCP does provide some mechanisms for mitigating these problems. The Relay Agent Information Option protocol extension (RFC 3046) allows network operators to attach tags to DHCP messages as these messages arrive on the network operator's trusted network. This tag is then used as an authorization token to control the client's access to network resources. Because the client has no access to the network upstream of the relay agent, the lack of authentication does not prevent the DHCP server operator from relying on the authorization token.[5]</div><div>Another extension, Authentication for DHCP Messages (RFC 3118), provides a mechanism for authenticating DHCP messages. Unfortunately RFC 3118 has not seen widespread adoption because of the problems of managing keys for large numbers of DHCP clients.[8]</div><div></div><div></div><div>整个过程：&nbsp;</div><div>1. DHCP请求IP地址的过程 l 发现阶段，即DHCP客户端寻找DHCP服务器的阶段。</div><div>客户端以广播方式发送DHCPDISCOVER包，只有DHCP服务器才会响应。</div><div></div><div>l 提供阶段，即DHCP服务器提供IP地址的阶段。</div><div>DHCP服务器接收到客户端的DHCPDISCOVER报文后，从IP地址池中选择一个尚未分配的IP地址分配给客户端，向该客户端发送包含租借的IP地址和其他配置信息</div><div>的DHCPOFFER包。&nbsp;</div><div></div><div>l 选择阶段，即DHCP客户端选择IP地址的阶段。如果有多台DHCP服务器向该客户端发送DHCPOFFER包，客户端从中随机挑选，然后以广播形式向各DHCP服务</div><div>器回应DHCPREQUEST包，宣告使用它挑中的DHCP服务器提供的地址，并正式请求该DHCP服务器分配地址。其它所有发送DHCPOFFER包的DHCP服务器接收</div><div>到该数据包后，将释放已经OFFER（预分配）给客户端的IP地址。 如果发送给DHCP客户端的DHCPOFFER包中包含无效的配置参数，客户端会向服务器发送</div><div>DHCPCLINE包拒绝接受已经分配的配置信息。</div><div></div><div>l 确认阶段，即DHCP服务器确认所提供IP地址的阶段。</div><div>当DHCP服务器收到DHCP客户端回答的DHCPREQUEST包后，便向客户端发送包含它所提供的IP地址及其他配置信息的DHCPACK确认包。然后，DHCP客户端</div><div>将接收并使用IP地址及其他TCP/IP配置参数。&nbsp;</div><div></div><div>2. DHCP客户端续租IP地址的过程</div><div>l DHCP服务器分配给客户端的动态IP地址通常有一定的租借期限，期满后服务器会收回该IP地址。如果DHCP客户端希望继续使用该地址，需要更新IP租约。</div><div>实际使用中，在IP地址租约期限达到一半时，DHCP客户端会自动向DHCP服务器发送DHCPREQUEST包，以完成IP租约的更新。如果此IP地址有效，</div><div>则DHCP服务器回应DHCPACK包，通知DHCP客户端已经获得新IP租约。 如果DHCP客户端续租地址时发送的DHCPREQUEST包中的IP地址与DHCP服务器当前</div><div>分配给它的IP地址（仍在租期内）不一致，DHCP服务器将发送DHCPNAK消息给DHCP客户端。&nbsp;</div><div></div><div>3. DHCP客户端释放IP地址的过程&nbsp;</div><div>l DHCP客户端已从DHCP服务器获得地址，并在租期内正常使用，如果该DHCP客户端不想再使用该地址，则需主动向DHCP服务器发送DHCPRELEASE包，</div><div>以释放该地址，同时将其IP地址设为0.0.0.0。</div><div>&nbsp;</div><img src ="http://www.blogjava.net/czihong/aggbug/377752.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/czihong/" target="_blank">Chan Chen</a> 2012-05-10 02:09 <a href="http://www.blogjava.net/czihong/articles/377752.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Bits and Bytes</title><link>http://www.blogjava.net/czihong/articles/372255.html</link><dc:creator>Chan Chen</dc:creator><author>Chan Chen</author><pubDate>Tue, 20 Mar 2012 03:01:00 GMT</pubDate><guid>http://www.blogjava.net/czihong/articles/372255.html</guid><wfw:comment>http://www.blogjava.net/czihong/comments/372255.html</wfw:comment><comments>http://www.blogjava.net/czihong/articles/372255.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/czihong/comments/commentRss/372255.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/czihong/services/trackbacks/372255.html</trackback:ping><description><![CDATA[<div style="text-align: left; "><strong><div><div><span style="font-size: 12px; color: red; ">Question: What Is the Difference Between Bits and Bytes?</span></div><div><span style="font-size: 12px;">The terms bit and byte are common in computer networking. Both terms refer to digital data transmitted over a network connection. For example, bits and bytes both may represent network addresses or port numbers.</span></div><div><span style="font-size: 12px;">Answer:</span></div><div><span style="font-size: 12px;">A bit is a single numeric value, either '1' or '0', that encodes a single unit of digital information. A byte is a sequence of bits; usually eight bits equal one byte.</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">For example, in Internet Protocol (IP) networking, IP addresses contain 32 bits or 4 bytes. The bits encode the network address so that it can be shared on the network. The bytes divide the bits into groups.</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">The IP address 192.168.0.1, for instance, is encoded with the following bits and bytes:</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">11000000 10101000 00000000 00000001</span></div><div><span style="font-size: 12px;">Bits are grouped into bytes to, generally speaking, increase the efficiency of computer hardware, including network equipment, disks and memory.</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px; color: red; ">Q. "Is there any difference between bps (small 'b') and Bps (capital 'b')?"&nbsp;</span></div><div><span style="font-size: 12px;"><br /></span></div><div><span style="font-size: 12px;">A. The term "bps" specifies network bandwidth in bits per second. The term "Bps" specifies network bandwidth in bytes per second.&nbsp;<br /><br /><div>unit converter:&nbsp;<a href="http://www.numion.com/calculators/units.html">http://www.numion.com/calculators/units.html</a></div></span></div></div></strong></div><img src ="http://www.blogjava.net/czihong/aggbug/372255.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/czihong/" target="_blank">Chan Chen</a> 2012-03-20 11:01 <a href="http://www.blogjava.net/czihong/articles/372255.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Telnet and SSH</title><link>http://www.blogjava.net/czihong/articles/371752.html</link><dc:creator>Chan Chen</dc:creator><author>Chan Chen</author><pubDate>Mon, 12 Mar 2012 09:29:00 GMT</pubDate><guid>http://www.blogjava.net/czihong/articles/371752.html</guid><wfw:comment>http://www.blogjava.net/czihong/comments/371752.html</wfw:comment><comments>http://www.blogjava.net/czihong/articles/371752.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/czihong/comments/commentRss/371752.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/czihong/services/trackbacks/371752.html</trackback:ping><description><![CDATA[<div style="display: inline-block; "><p style="font-family: Arial, Helvetica, sans-serif; line-height: 18px; text-align: left; background-color: #ffffff; font-size: small; "><br /></p></div><div><span style="background-color: yellow; ">Telnet is a protocol that allows you to connect to remote computers (called hosts) over a TCP/IP network</span> (such as the Internet). You use software called a telnet client on your computer to make a connection to a telnet server (i.e., the remote host). Once your telnet client establishes a connection to the remote host, your client becomes a virtual terminal, allowing you to communicate with the remote host from your computer. In most cases, you'll need to log into the remote host, which requires that you have an account on that system. Occasionally, you can log in as guest or public without having an account.</div><div></div><div>Telnet clients are available for all major operating systems.</div><div></div><div>Command-line telnet clients are built into most versions of Mac OS X, Windows, Unix, and Linux. To use them, go to their respective command lines (i.e., the Terminal application in Mac OS X, the shell in Unix or Linux, or the DOS prompt in Windows), and then enter:</div><div></div><div>&nbsp; telnet host</div><div></div><div><span style="background-color: yellow; ">Secure Shell (SSH) is a network protocol for secure data communication, remote shell services or command execution and other secure network services between two networked computers that it connects via a secure channel over an insecure network: a server and a client (running SSH server and SSH client programs, respectively).</span>[1] The protocol specification distinguishes two major versions that are referred to as SSH-1 and SSH-2.</div><div>The best-known application of the protocol is for access to shell accounts on Unix-like operating systems. It was designed as a replacement for Telnet and other insecure remote shell protocols such as the Berkeley rsh and rexec protocols, which send information, notably passwords, in plaintext, rendering them susceptible to interception and disclosure using packet analysis.[2] The encryption used by SSH is intended to provide confidentiality and integrity of data over an unsecured network, such as the Internet.</div><img src ="http://www.blogjava.net/czihong/aggbug/371752.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/czihong/" target="_blank">Chan Chen</a> 2012-03-12 17:29 <a href="http://www.blogjava.net/czihong/articles/371752.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>How does DNS work</title><link>http://www.blogjava.net/czihong/articles/370335.html</link><dc:creator>Chan Chen</dc:creator><author>Chan Chen</author><pubDate>Mon, 20 Feb 2012 03:47:00 GMT</pubDate><guid>http://www.blogjava.net/czihong/articles/370335.html</guid><wfw:comment>http://www.blogjava.net/czihong/comments/370335.html</wfw:comment><comments>http://www.blogjava.net/czihong/articles/370335.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/czihong/comments/commentRss/370335.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/czihong/services/trackbacks/370335.html</trackback:ping><description><![CDATA[<div><h1><span class="Apple-style-span" style="font-size: 14px; font-weight: normal; "><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">Suppose your computer wants to find the IP address of</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>network-surveys.cr.yp.to</tt></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">. It contacts a series of</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><strong>DNS servers</strong></span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">around the Internet.</span></span></h1><p style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">There are several DNS servers with information about&nbsp;<tt>network-surveys.cr.yp.to</tt>. A central&nbsp;<strong>root server</strong>&nbsp;(located at Internet HQ in Virginia) has the following data in a file on disk:</p><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><pre>     .:198.41.0.4      <br />&nbsp;&nbsp;&nbsp;&nbsp; &amp;to:198.6.1.82 </pre></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">The root server's IP address is 198.41.0.4; your computer also has this address in a file on disk. Your computer sends its question to the root server, and receives a response from the root server's data:</span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><pre>&nbsp;&nbsp;&nbsp;&nbsp; +--------+  network-surveys.cr.yp.to?  +-----------+      <br />&nbsp;&nbsp;&nbsp;&nbsp; |  Your  | --------------------------&gt; |198.41.0.4 |      <br />&nbsp;&nbsp;&nbsp;&nbsp; |computer|      &lt;---------------       |root server|      <br />&nbsp;&nbsp;&nbsp;&nbsp; +--------+       &amp;to:198.6.1.82        +-----------+ </pre></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">The response</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>&amp;to:198.6.1.82</tt></span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">is a</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><strong>delegation</strong></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">. It says ``For information about</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>.to</tt></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">, ask the DNS server at IP address 198.6.1.82.''</span><p style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">The DNS server at 198.6.1.82 (also located somewhere in Virginia) has the following data in a file on disk:</p><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><pre>     .to:198.6.1.82      &amp;yp.to:131.193.178.160 </pre></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">Your computer sends its question to that DNS server, and receives a response:</span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><pre>     +--------+  network-surveys.cr.yp.to?  +----------+      <br />&nbsp;&nbsp;&nbsp;&nbsp; |  Your  | --------------------------&gt; |198.6.1.82|      <br />&nbsp;&nbsp;&nbsp;&nbsp; |computer|  &lt;------------------------  |.to server|      <br />&nbsp;&nbsp;&nbsp;&nbsp; +--------+    &amp;yp.to:131.193.178.160   +----------+ </pre></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">The response</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>&amp;yp.to:131.193.178.160</tt></span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">is another delegation. It says ``For information about</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>.yp.to</tt></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">, ask the DNS server at IP address 131.193.178.160.''</span><p style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">The DNS server at 131.193.178.160 (located in my office in Chicago) has the following data in a file on disk:</p><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><pre>     .yp.to:131.193.178.160      =network-surveys.cr.yp.to:131.193.178.100 </pre></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">Your computer sends its question to that DNS server, and receives a response:</span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><pre>     +--------+           network-surveys.cr.yp.to?         +---------------+      <br />&nbsp;&nbsp;&nbsp;&nbsp; |  Your  | ------------------------------------------&gt; |131.193.178.160|      <br />&nbsp;&nbsp;&nbsp;&nbsp; |computer| &lt;------------------------------------------ | .yp.to server |      <br />&nbsp;&nbsp;&nbsp;&nbsp; +--------+  =network-surveys.cr.yp.to:131.193.178.100  +---------------+ </pre></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">The response</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>=network-surveys.cr.yp.to:131.193.178.100</tt></span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">finally answers the original question: the IP address of</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>network-surveys.cr.yp.to</tt></span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">is 131.193.178.100.</span><p style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">All of this work is handled by a&nbsp;<strong>DNS cache</strong>&nbsp;running on your computer. Your computer remembers everything that it learned (for a limited amount of time; information changes!) to save time later. As an alternative, your computer can contact an external DNS cache operated by your Internet service provider; the external DNS cache will do all the work and report the answer.</p><h2>Multiple servers</h2><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">To protect against computer failure, there are actually several root servers, several</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>.to</tt></span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">servers, and two</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>yp.to</tt></span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">servers. Each of the root servers has the following information:</span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><pre>    .:198.41.0.4:a      <br />&nbsp;&nbsp;&nbsp;&nbsp;.:128.9.0.107:b      <br />&nbsp;&nbsp;&nbsp;&nbsp;.:192.33.4.12:c      <br />&nbsp;&nbsp;&nbsp;&nbsp;.:128.8.10.90:d      <br />&nbsp;&nbsp;&nbsp;&nbsp;.:192.203.230.10:e      <br />&nbsp;&nbsp;&nbsp;&nbsp;.:192.5.5.241:f      <br />&nbsp;&nbsp;&nbsp;&nbsp;.:192.112.36.4:g      <br />&nbsp;&nbsp;&nbsp;&nbsp;.:128.63.2.53:h      <br />&nbsp;&nbsp;&nbsp;&nbsp;.:192.36.148.17:i      <br />&nbsp;&nbsp;&nbsp;&nbsp;.:192.58.128.30:j      <br />&nbsp;&nbsp;&nbsp;&nbsp;.:193.0.14.129:k      <br />&nbsp;&nbsp;&nbsp;&nbsp;.:198.32.64.12:l      <br />&nbsp;&nbsp;&nbsp;&nbsp;.:202.12.27.33:m      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;to:128.250.1.21:a      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;to:193.0.0.193:b      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;to:196.7.0.139:c      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;to:206.184.59.10:d      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;to:198.6.1.82:e      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;to:206.86.247.253:f      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;to:148.59.19.11:g </pre></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">Each of the</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>.to</tt></span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">servers has the following information:</span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><pre>    .to:128.250.1.21:a      <br />&nbsp;&nbsp;&nbsp;&nbsp;.to:193.0.0.193:b      <br />&nbsp;&nbsp;&nbsp;&nbsp;.to:196.7.0.139:c      <br />&nbsp;&nbsp;&nbsp;&nbsp;.to:206.184.59.10:d      <br />&nbsp;&nbsp;&nbsp;&nbsp;.to:198.6.1.82:e      <br />&nbsp;&nbsp;&nbsp;&nbsp;.to:206.86.247.253:f      <br />&nbsp;&nbsp;&nbsp;&nbsp;.to:148.59.19.11:g      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;yp.to:131.193.178.181:a      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;yp.to:131.193.178.160:b      <br />&nbsp;&nbsp;&nbsp;&nbsp;# or, in BIND master zone-file format:      <br />&nbsp;&nbsp;&nbsp;&nbsp;# yp.to IN NS a.ns.yp.to      <br />&nbsp;&nbsp;&nbsp;&nbsp;# yp.to IN NS b.ns.yp.to      <br />&nbsp;&nbsp;&nbsp;&nbsp;# a.ns.yp.to IN A 131.193.178.181      <br />&nbsp;&nbsp;&nbsp;&nbsp;# b.ns.yp.to IN A 131.193.178.160 </pre></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">Your computer tries the root servers in a random order. When it receives a response from some root server, it moves to the</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>.to</tt></span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">servers, and tries them in a random order. It eventually receives the answer from one of the two</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>yp.to</tt></span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">servers.</span><h2><a name="reverse" style="width: 20px; height: 20px; text-indent: 20px; background-image: url(http://www.blogjava.net/CuteSoft_Client/CuteEditor/Load.ashx?type=image&amp;file=anchor.gif); background-repeat: no-repeat no-repeat; "></a>Reverse lookups</h2><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">Suppose your computer sees the IP address 208.33.217.122 and wants to know the corresponding computer name.</span><p style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">Your computer asks a series of DNS servers about the name&nbsp;<tt>122.217.33.208.in-addr.arpa</tt>. The root servers have the following information:</p><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><pre>    &amp;33.208.in-addr.arpa:206.228.179.10:c      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;33.208.in-addr.arpa:144.228.254.10:b      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;33.208.in-addr.arpa:144.228.255.10:a </pre></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">The DNS server at IP address 144.228.254.10 has the following information:</span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><pre>    .33.208.in-addr.arpa:144.228.255.10:a      <br />&nbsp;&nbsp;&nbsp;&nbsp;.33.208.in-addr.arpa:206.228.179.10:c      <br />&nbsp;&nbsp;&nbsp;&nbsp;.33.208.in-addr.arpa:144.228.254.10:b      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;217.33.208.in-addr.arpa:209.191.164.20:a      <br />&nbsp;&nbsp;&nbsp;&nbsp;&amp;217.33.208.in-addr.arpa:206.253.194.65:b </pre></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">The DNS server at IP address 209.191.164.20 has the following information:</span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><pre>    .217.33.208.in-addr.arpa:209.191.164.20:a      <br />&nbsp;&nbsp;&nbsp;&nbsp;.217.33.208.in-addr.arpa:206.253.194.65:b      <br />&nbsp;&nbsp;&nbsp;&nbsp;=mm-outgoing.amazon.com:208.33.217.122 </pre></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">The answer is</span>&nbsp;<span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "><tt>mm-outgoing.amazon.com</tt></span><span style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">.</span><p style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; ">Looking up the address for a name, and then the computer name for that address, doesn't necessarily produce the original name. Looking up the computer name for an address, and then the address for that name, doesn't necessarily produce the original address.</p></div><p>&nbsp;<br /><div><span style="color: #333333; font-family: Arial, Verdana, sans-serif; line-height: normal; background-color: yellow; ">1.	Your web browser asks the resolving DNS server what the address of www.domainname.com is. Your computer already knows where the local ISP resolving DNS server is through its network configuration.&nbsp;<br /></span><span style="color: #333333; font-family: Arial, Verdana, sans-serif; line-height: normal; background-color: yellow; ">2.	The Resolving DNS server does not know the address. So it asks a root server the same question. The 13 root servers have globally well-known IP addresses, and are run by a US-based company called ICANN<br /></span><span style="color: #333333; font-family: Arial, Verdana, sans-serif; line-height: normal; background-color: yellow; ">3.	The root server replies that it does not know, but it gives the address of the server which knows about .com domains.&nbsp;<br /></span><span style="color: #333333; font-family: Arial, Verdana, sans-serif; line-height: normal; background-color: yellow; ">4.	The resolving DNS server asks the .com server what the address of www.domainname.com is.&nbsp;<br /></span><span style="color: #333333; font-family: Arial, Verdana, sans-serif; line-height: normal; background-color: yellow; ">5.	The .com server replies that it does not know, but it gives the address of the server which knows about .domainname.com domain. This server is can be a managed server and many companies pay an annual fee (via a domain registar) to maintain this referral for their domain.<br /></span><span style="color: #333333; font-family: Arial, Verdana, sans-serif; line-height: normal; background-color: yellow; ">6.	The resolving DNS server asks the .domainname.com server what the address of www.domainname.com is.&nbsp;<br /></span><span style="color: #333333; font-family: Arial, Verdana, sans-serif; line-height: normal; background-color: yellow; ">7.	The server answers the query with the IP address of www.domainname.com, and marks the response as &#8220;authoratitve&#8221;. This is an assertion that the answer is correct and complete. It also adds to its reply that &#8220;this data is valid for 24 hours&#8221;, so that anyone who is asking can confidently re-use the information for that time without having to issue another query.&nbsp;<br /></span><span style="color: #333333; font-family: Arial, Verdana, sans-serif; line-height: normal; background-color: yellow; ">8.	The resolving DNS server finally has its answer, and can reply back to the web browser with the IP address. Crucially it marks its answer as &#8220;non-authoratitive&#8221;, so that the web browser knows it has the information indirectly</span></div></p><img src ="http://www.blogjava.net/czihong/aggbug/370335.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/czihong/" target="_blank">Chan Chen</a> 2012-02-20 11:47 <a href="http://www.blogjava.net/czihong/articles/370335.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>